Toni Tunkkari wrote:
Any ideas how to use blobs. I need some examples?
Here's a snippet of interesst...
$sql="select * from artikelbild where artid=$aid";
$q=ibase_query($sql);
while ($r = ibase_fetch_object($q))
{
$tempfile[$c] = tempnam("temp".$c,"tmp");
$tempfile[$c] .=".jpg";
$blobid=ibase_blob_open($r->BILD);
$fileid[$c]=fopen($tempfile[$c],"w");
while ($pic=ibase_blob_get($blobid,10240))
{
fputs($fileid[$c],$pic);
}
ibase_blob_close($blobid);
fclose($fileid[$c]);
$c++;
}
for ($c=0;$c<sizeof($tempfile);$c++)
{
$dest="/htdocs/shop/image".$c.$aid.".jpg";
copy($tempfile[$c],$dest);
echo "<BR><BR><CENTER><IMG SRC='image".$c.$aid.".jpg'></CENTER>";
}
ibase_free_result($q);
ibase_commit();