Re: call_user_func_array and mysqli_stmt_bind_result
| From: | Skrol29 | Date: | Tue, 12 Apr 2005 14:59:27 +0000 |
| Subject: | Re: call_user_func_array and mysqli_stmt_bind_result | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212921@lists.php.net to get a copy of this message | ||
Hello,
mysqli_stmt_bind_result() is a special function that takes parameters by reference after the first one.
When you code:
mysqli_stmt_bind_result ($stmt, $arr[1], $arr[2]);
Then $arr[1] and $arr[2] can be passed by reference.
But when you code:
$arr[0]=$stmt; $arr[1]=''; $arr[2]='';
call_user_func_array ('mysqli_stmt_bind_result',$arr);
Then '' and '' cannot be passed by reference.
It should be:
$prmlst = array($stmt,&$arr[1],&$arr[2]);
call_user_func_array ('mysqli_stmt_bind_result',$prmlst);
Enjoy,
---------------------
Skrol29
www.tinybutstrong.com
---------------------
Patrick a écrit :
Hi, This is working (as a packet of crackers): ... mysqli_stmt_bind_result ($stmt, $arr[1], $arr[2]); ... This I cannot get to work: ... $arr[0]=$stmt; $arr[1]=''; $arr[2]=''; call_user_func_array ('mysqli_stmt_bind_result',$arr); ... I'm not sure if what I try to do is possible in any way? Btw, this is Win PHP v5.0.3 , Apache v2.0.53, Mysql v5.0.2-alpha-nt. cheers and thanks, Patrick from Belgium (Brussels)