[PHP-DB] can i display an image _directly_ from postgres db storage?

2004-11-01 Thread P. George
i know that postgres has a raw binary datatype called bytea for storing pictures and whatnot, but i'm having trouble finding an example of displaying an image on a web page with php that is pulled directly from the database? is this possible? if so, how? thanks. - philip -- PHP Database

Re: [PHP-DB] can i display an image _directly_ from postgres db storage?

2004-11-01 Thread P. George
Typically, it's infinitely more performance-friendly to simply store your files on the hard disk and use the database to refer to that location. For instance, assume your root web dir is /www. Inside there you have an /images directory. If you religiously put all files inside of /images you

Re: [PHP-DB] can i display an image _directly_ from postgres db storage?

2004-11-01 Thread P. George
Tutorials that shows how to upload and store image/binary files in a database also usually shows how to retrieve them (and in the case of images, also how to display them). One function you'll find useful is imagecreatefromstring() thanks. i found an example for uploading an image into the

Re: [PHP-DB] can i display an image _directly_ from postgres db storage?

2004-11-01 Thread P. George
$result = pg_exec($dbconn, SELECT $image FROM thetable where name='$name'); nevermind. i had a missing double-quote on this line. works great now. thanks. - philip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php