Re: file storing in mysql db column mediumblob
| From: | Daniel Convissor | Date: | Tue, 17 Oct 2000 13:54:28 +0000 |
| Subject: | Re: file storing in mysql db column mediumblob | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20634@lists.php.net to get a copy of this message | ||
Heya Dominick:
> How can I store a file content, size and name in a mysql db? Does anyone
> have a good example?
You're best off not storing the file itself, rather store the file path/name.
Anyway, create the table with a blob column type to store the file, check out
the PHP manual for filesize() and fread(). Insert the results of those two
functions in your db.
Enjoy,
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409