MySQLI binding params using call_user_func_array

后端 未结 7 2322
别跟我提以往
别跟我提以往 2020-11-30 09:01

Please see below my code. I am attempting to bind an array of paramenters to my prepared statement. I\'ve been looking around on the web and can see I have to use call_user_

7条回答
  •  时光说笑
    2020-11-30 09:54

    I wouldn't know why you have to use call_user_func_array, but that's another story.

    The only thing that could be wrong in my eyes is that you are using a reference to the object. Assuming you're using PHP 5.*, that is not necessary:

    call_user_func_array(array($stmt, 'bind_param'), $params);
    

提交回复
热议问题