note 104959 deleted from mysqli-stmt.bind-param by danbrown
| From: | danbrown@php.net | Date: | Tue, 19 Jul 2011 15:52:22 +0000 |
| Subject: | note 104959 deleted from mysqli-stmt.bind-param by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181706@lists.php.net to get a copy of this message | ||
Note Submitter: wanted at gmail dot com
----
Correction from an example submitted below:
<?php
$db = new mysqli("localhost","root","","tests");
$res = $db->prepare("INSERT INTO test SET foo=?,bar=?");
$refArr = array("si","hello",42);
$ref = new ReflectionClass('mysqli_stmt');
$method = $ref->getMethod("bind_param");
$refArr = array_unshift($refArr, $res);
$method->invokeArgs($refArr); // This method does not take 2 arguments
$res->execute();
?>