RE: [PHP] GD to database directly

From: Date: Mon, 10 Jul 2006 17:39:30 +0000
Subject: RE: [PHP] GD to database directly
Groups: php.general 
Request: Send a blank email to php-general+get-239265@lists.php.net to get a copy of this message
[snip] I am creating images via GD and want to save them to the database. Right now I save them to the disk and then save them to the database. Is it possible to write them directly to the database and skip the middle step where I temporary write it to the hard disk? [/snip] 1. Do not store images in a database, it is just a bad idea from a performance perspective (as has been covered many times heretofore). 2. If you insist on storing the image in a database you can use any of the image output functions, for instance; INSERT INTO table (picture) VALUE ('".imagegd($resource, 'imagename')."')

« previous php.general (#239265) next »