Handling a BLOB (zip file) called from MySQL

From: Spyproductions Support Team (support_at_spyproductions.com)
Date: 10/31/03


To: <php-general@lists.php.net>
Date: Fri, 31 Oct 2003 08:45:24 -0500


I am trying to figure out how to best handle a record that contains a zip
file (BLOB) in MySQL.

When I call it out from the table, is the best way to handle the file by
writing it to a temporary directory?

The BLOB represents a '.zip' file, so should I be using: zip_open /zip_read
/ zip_close when loading and retrieving the file to/from the data table? Or
would fopen and such in binary mode be sufficient?

I don't need to open the zip file and see what is inside per se - just want
to store into the data table and pull it out as a file that can be
downloaded.

:)

Thanks!

-Mike



Relevant Pages

  • Re: Some questions about sparse files
    ... The indiex is the cookie I returned from my Store() method. ... to be able to say that the benefit of using your sparse file is sufficient ... storing metadata creates the possibility of file corruption - consider ... the case of process termination during a blob insert. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: why would i want to put my mysql password in the yml fil
    ... having "correct file permissions". ... Typically the server component (like MySQL) doesn't store your ... database connection. ...
    (comp.lang.ruby)
  • Re: Some questions about sparse files
    ... remove "nospam" change community. ... In my case they ask me to store a blob. ... In addition I have the ability to enumerate all the blobs in the store. ... Of course the primary reason to use a sparse file ...
    (microsoft.public.win32.programmer.kernel)
  • Re: how do I store a binary file in a MySql database, as a string?
    ... a string, and then store in a MySql database, in, say, a MediumText ... I realize that MySql supports binary fields, ... can store the file without changing my current schema. ... Can I recreate the file later, if I wish, just be grabbing the string ...
    (comp.lang.php)
  • Re: how do I store a binary file in a MySql database, as a string?
    ... I realize that MySql supports binary fields, ... current MySql schema does not have any binary fields, ... wondering if I can store the file without changing my current schema. ... AFAIK you need to use blob fields as your data is binary (or is it, ...
    (comp.lang.php)