Subject Re: [firebird-php] Show a Jpg stored as Binary blob in a firebird table with PHP
Author Almond
At 19:34 03/06/24 +0000, you wrote:
>Hello,
>can someone help me?
>I try to make a webpage (PHP4, Firebird 1.5 b3, Apace WEbserver)
>and have the following problem:
>show pictures that was stored in a table as binary blob
>...,
>GID integer not null,
>GRUND_FOTO BLOB SUB_TYPE 0 SEGMENT SIZE 80,
>...
>echo row->grund_foto didn't work, smile ...
>thanks
>-Gerhard

$sst = "SELECT image, image_type FROM images_tbl WHERE images_id='123'' ";
$result = ibase_query($sst, $f);
if(empty($result)) echo SQL_error($f,$sst)."<BR>";
$tmprow=SQL_fetch_object($result,0);
$image = $tmprow->image;

header("Content-type: ".$tmprow->image_type);
headers_sent();

ibase_blob_echo($image);