Re: BLOB
| From: | heilo | Date: | Mon, 27 Jan 2003 15:08:34 +0000 |
| Subject: | Re: BLOB | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25167@lists.php.net to get a copy of this message | ||
Thxalot!
I didn't thought it would be that easy *g*
- matthias st.
John W. Holmes <holmes072000@charter.net> wrote@27.01.2003 14:12 Uhr:
>> Does anybody know a good reference, where I can lern how to insert
> binary
>> data (e.g. Images) into a BLOB-Field of a MySQL-Database?
>
> Use fopen() to open the image, fread() it into a variable, and insert
> that variable like you would any other one. If the image is coming from
> an <input type="file"> element, then you already have the image data
> present in the $_FILES array that you can insert.
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
>
>