[Vfs-devel] Update on file storage inside MySQL.
Status: Alpha
                
                Brought to you by:
                
                    eesa
                    
                
            | 
      
      
      From: Tony K. <tk...@ca...> - 2000-06-21 21:49:45
      
     | 
| Hey all!
    In the free time I've had this last week I've been working on a little
code for storing and retrieving files from inside MySQL and I've come up
with two ways of doing it that seem perfect. Here's the debate. The first
option is to use a new MySQL function called Load_File() which I just found
out was introduced in version 3.23. However 3.22 and < versions won't be
able to access this. So it a perfect solution but not a good idea as only
users of 3.23 and > would have access to the function. The other solution
would be to use the following code;
$binarydata = addslashes(fread(fopen($filename,  "r"),
filesize($filename)));
Then insert that into the database. After checking to make sure the file
still exists and all that other good stuff :) What do you guys think?
Regards,
Tony Kirk
 |