Getting image from a DB

Поиск
Список
Период
Сортировка
От Félix Sánchez Rodríguez
Тема Getting image from a DB
Дата
Msg-id 006101c9cf3f$fa877380$3000a8c0@atenea
обсуждение исходный текст
Ответы Re: Getting image from a DB  (Andy Shellam <andy-lists@networkmail.eu>)
Список pgsql-admin
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 is that for each "strange" character, like ÿ, it writes, for instance, \377, it is, the "\" symbol plus the character's numeric code. I guessed that there were some function for this situation but I couldn't find it. If you can't help me, I'll have to parse the whole image contents, with the subsequent performance impact.
 
PD: The image field is of type bytea,as you recommend me.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Lennin Caro
Дата:
Сообщение: Re: How to run PostgreSQL?
Следующее
От: Andy Shellam
Дата:
Сообщение: Re: Getting image from a DB