Contrary to it's description, the function does not always execute the query, unless you try fetching the results. I discovered this through the following code:
<?php
$result = ibase_query($dbh,"SELECT boniid FROM PROC_INS_OBONI_DELIV_ADDBONITM ( ? , ? , ? , ? , null , ? )", $bon_id , $plucode2 , $amount , $note , $discount);
$this->log_add(mb_convert_encoding("SELECT boniid FROM PROC_INS_OBONI_DELIV_ADDBONITM ( " . $bon_id . ", " . $plucode2 . ", " . $amount . ", " . $note . ", " . $nullparent . ", " . $discount . " )",'utf8','cp1251'));
if (!$result){
$errmsg = ibase_errmsg();
ibase_rollback($dbh);
ibase_close($dbh);
$this->log_add("Item (" . $mid . " - " . $plucode2 . ") : Error returned (" . __LINE__ . "): " . $errmsg);
return "Error sending product ( $m_name). Error message: $errmsg";
}
$row = ibase_fetch_assoc($result);
?>
This problem may be limited to FireBird 1.5 or it may not be. Either way, be wary of it.