note 117900 added to function.ibase-query

From: Date: Fri, 28 Aug 2015 11:18:07 +0000
Subject: note 117900 added to function.ibase-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-203498@lists.php.net to get a copy of this message
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"; } // item data does NOT enter the database if I don't call ibase_fetch_assoc $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. ---- Server IP: 72.52.91.14 Probable Submitter: 46.10.239.161 ---- Manual Page -- http://php.net/manual/en/function.ibase-query.php Edit -- https://master.php.net/note/edit/117900 Del: integrated -- https://master.php.net/note/delete/117900/integrated Del: useless -- https://master.php.net/note/delete/117900/useless Del: bad code -- https://master.php.net/note/delete/117900/bad+code Del: spam -- https://master.php.net/note/delete/117900/spam Del: non-english -- https://master.php.net/note/delete/117900/non-english Del: in docs -- https://master.php.net/note/delete/117900/in+docs Del: other reasons-- https://master.php.net/note/delete/117900 Reject -- https://master.php.net/note/reject/117900 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203498) next »