Does anybody out there know how to write BLOB data
to Interbase from PHP(4)?
Using a few undocumented functions I found in
the source I came up with this:
$conn=ibase_connect(...);
$trans=ibase_trans();
$blob_id=ibase_blob_create($conn); ibase_blob_add($blob_id,"test of blob insert...line 1"); $blob_id_str=ibase_blob_close($blob_id); ibase_query($conn,"insert into access_levels values (1,$blob_id_str)"; ibase_commit($trans); The blob_create and blob_close seem to work ok (i
checked the return values) but when I execute the insert statement, I get
the following:
Warning: InterBase: Dynamic SQL Error SQL
error code = -104 Token unknown - line 1, char 37 in
/var/live/development/Crimmthann/blobtest.php on line
18
It would seem that PHP is not handling the value of
the $blob_id_str correctly.
Any ideas?
Cheers,
Andrew
|