Getting image from a DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux