note 95644 deleted from mysqli-stmt.bind-param by danbrown

From: Date: Wed, 13 Jan 2010 20:57:16 +0000
Subject: note 95644 deleted from mysqli-stmt.bind-param by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164946@lists.php.net to get a copy of this message
Note Submitter: Leonid Rogov ---- 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.

« previous php.notes (#164946) next »