Subject Re: File upload
Author .Christophe DERENNE
Hi, of course you can !

For example :

function UpdateBlobFile($pkid,$filename)
{
$msg="";
$fd=fopen($filename,"r");
if ($fd)
{
@$blob =ibase_blob_import($this->db, $fd);
fclose($fd);
if (!$blob)
$msg="Cannot import";
else
{
$query = "UPDATE MYTABLE SET REPORT = ? WHERE MYPKID = ".$pkid;
$prepared=ibase_prepare($this->db,$query);
if ($prepared)
{
if (!ibase_execute($prepared,$blob))
$msg=ibase_errmsg();
}
else $msg=ibase_errmsg();
}
}
else $msg="Cannot read ".$filename;
return $msg;
}

Rgds

Christophe Derenne


[Non-text portions of this message have been removed]