Re: blob
| From: | 1LT John W. Holmes | Date: | Tue, 07 Jan 2003 20:31:46 +0000 |
| Subject: | Re: blob | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24625@lists.php.net to get a copy of this message | ||
> I want to be able to load PDFs into mysql DB, but I'm not very familiar
with
> the blob data type?
> Can someone point me on the right direction how to do this?
Use fopen() in binary mode and fread() to read the file into a string, then
insert it into the
database as you would any other variable in any other column. Make
sure you have a large enough BLOB to support your file sizes.
---John Holmes...