Re: [ADMIN] Getting image from a DB

2009-05-08 Thread Félix Sánchez Rodríguez
Well, using pg_unescape_bytea I was able to get the image. How can I stream it directly to the users's browser?? - Original Message - From: "Andy Shellam" To: "Félix Sánchez Rodríguez" Cc: Sent: Friday, May 08, 2009 8:26 AM Subject: Re: [ADMIN] Getting im

Re: [ADMIN] Getting image from a DB

2009-05-07 Thread Andy Shellam
Hi Felix, I've not written an image specifically, but I have read/written byte data which is all an image is. Your PostgreSQL database column that holds the image should be of type "bytea." Your PHP application must then use the following functions: Writing to the database - http://uk2.php

[ADMIN] Getting image from a DB

2009-05-07 Thread Félix Sánchez Rodríguez
Hi: Has anybody here had to capture an image from a PostgreSQL Data Base using PHP?? I used a simple query: select photo from people where id = 3, for instance. The problem is that when I write the image to disk it's not a valid image. I opened it using an HEX editor and saw that the question i