RE: [PHP-DB] BLOB

From: Date: Mon, 27 Jan 2003 13:12:17 +0000
Subject: RE: [PHP-DB] BLOB
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25166@lists.php.net to get a copy of this message
> 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/

« previous php.db (#25166) next »