OID output problems

Поиск
Список
Период
Сортировка
От surfer girl
Тема OID output problems
Дата
Msg-id 20000502200015.40FB050BD@sitemail.everyone.net
обсуждение исходный текст
Ответы Re: OID output problems  (Karel Zak <zakkr@zf.jcu.cz>)
Re: OID output problems  ("Robert B. Easter" <reaster@comptechnews.com>)
Список pgsql-general
Hello,

I am trying to write a program that will input and output images from a Postgres database using PHP.

The inputting seems to be going fine  - well, it seems to be fine, since I can't test it because it's the output I'm
stuckon. 

What I've got so far is:

<?PHP
Header("Content-type: image/gif");
(DATABASE CONNECT STUFF HERE)
pg_exec ($conn, "BEGIN");
$result = pg_Exec($conn, "SELECT file FROM file WHERE key_fileid = '7'");
$oid = pg_Result($result, 0, "file");
$handle = pg_loopen($conn, $oid, "r");
pg_loreadall($handle);
pg_exec ($conn, "COMMIT");
?>

What this does is print up a broken image in the browser. If you view the source it will provide a name of a temp file,
i.e.,/tmp/php08543baa 

Am I missing something here? Or is the temp file not being written to properly or something?

Thanks in advance




_____________________________________________________________
Get It Gear --> http://www.getitgear.com

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

Предыдущее
От: Scott Holmes
Дата:
Сообщение: Need help with attributes...
Следующее
От: Ed Loehr
Дата:
Сообщение: Re: Need help with attributes...