faqts : Computers : Programming : Languages : PHP : Database Backed Sites : Postgres

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 12 people (50%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How do you read Large Object data from your database, and then present that data as an image or downloadable file?

Jun 4th, 2002 09:37
Rick Ellis, Christopher Fossenier, http://www.php.net/manual/en/function.pg-lo-open.php


Use pg_lo_ropen to connect to the large object.
Set the mime type.  Example:  header("Content-Type: image/png");
Use pg_lo_read_all to read the object and send it to the browser.