note 95644 added to mysqli-stmt.bind-param
| From: | LeonidRogov at osu1 dot php dot net | Date: | Wed, 13 Jan 2010 19:48:31 +0000 |
| Subject: | note 95644 added to mysqli-stmt.bind-param | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164940@lists.php.net to get a copy of this message | ||
For calling mysqli_stmt_bind_result with call_user_func_array you may pass variables instead of
references:
<?php
$db = new mysqli('myhost', 'myuser', 'mypassword', 'mydb');
$stmt = $db->prepare('SELECT ARTICLE FROM ARTICLES WHERE ID = ?');
$id = 5;
call_user_func_array(array($stmt, 'bind_param'), array('i', &$id));
?>
is equivalent to:
<?php
call_user_func_array(array($stmt, 'bind_param'), array('i', $id));
?>
However, for calling mysqli_stmt_bind_result with call_user_func_array() you must always pass
variables by reference.
----
Server IP: 69.147.83.197
Probable Submitter: 93.80.85.130
----
Manual Page -- http://www.php.net/manual/en/mysqli-stmt.bind-param.php
Edit -- https://master.php.net/note/edit/95644
Del: integrated -- https://master.php.net/note/delete/95644/integrated
Del: useless -- https://master.php.net/note/delete/95644/useless
Del: bad code -- https://master.php.net/note/delete/95644/bad+code
Del: spam -- https://master.php.net/note/delete/95644/spam
Del: non-english -- https://master.php.net/note/delete/95644/non-english
Del: in docs -- https://master.php.net/note/delete/95644/in+docs
Del: other reasons-- https://master.php.net/note/delete/95644
Reject -- https://master.php.net/note/reject/95644
Search -- https://master.php.net/manage/user-notes.php