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

2004-11-02 Thread Joshua D. Drake
Jason Wong wrote: On Tuesday 02 November 2004 03:36, P. George wrote: 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?

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

2004-11-02 Thread Robby Russell
On Mon, 2004-11-01 at 21:36 -0600, P. George wrote: 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

[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 Mike
usually encouraged not to store BLOBs whenever possible due to the performance hit that's usually associated with that. -M -Original Message- From: P. George [mailto:[EMAIL PROTECTED] Sent: Monday, November 01, 2004 10:36 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] can i display an image

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 Jason Wong
On Tuesday 02 November 2004 03:36, P. George wrote: 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

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