note 76565 added to function.mysqli-stmt-bind-param
| From: | usera at example dot com | Date: | Fri, 20 Jul 2007 15:50:47 +0000 |
| Subject: | note 76565 added to function.mysqli-stmt-bind-param | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128768@lists.php.net to get a copy of this message | ||
Some examples in the documentation suggest that you can call $stmt->bind_param() once, then call
$stmt->execute() several times while altering the bound variables each time, so as to e.g. insert
several records into a data base. This is not true.
You need to call $stmt->bind_param() once each time AFTER you altered the set of variables, and
BEFORE you call $stmt->execute()
This may be a bug. If it is not, the documentation is flawed, and there is no gain to the programmer
using the new mysqli interface at this point.
----
Server IP: 217.13.201.10
Probable Submitter: 88.76.219.215
----
Manual Page -- http://www.php.net/manual/en/function.mysqli-stmt-bind-param.php
Edit -- https://master.php.net/note/edit/76565
Del: integrated -- https://master.php.net/note/delete/76565/integrated
Del: useless -- https://master.php.net/note/delete/76565/useless
Del: bad code -- https://master.php.net/note/delete/76565/bad+code
Del: spam -- https://master.php.net/note/delete/76565/spam
Del: non-english -- https://master.php.net/note/delete/76565/non-english
Del: in docs -- https://master.php.net/note/delete/76565/in+docs
Del: other reasons-- https://master.php.net/note/delete/76565
Reject -- https://master.php.net/note/reject/76565
Search -- https://master.php.net/manage/user-notes.php