PHP : Function Reference : Firebird/InterBase Functions : ibase_blob_add
a dot w dot peters
To actually insert the BLOB into a table, the following snippet of code shows how this can be done.
<?php
$dbh = ibase_connect($host, $user, $pass);
$blh = ibase_blob_create($dbh);
ibase_blob_add($blh, $data);
$blobid = ibase_blob_close($blh);
$sql = "INSERT INTO blobtable(blobfield) VALUES (?)";
$sth = ibase_query($dbh, $sql, $blobid);
?>
|