PHP and MySQLi - Cannot pass parameter 2 by reference in

左心房为你撑大大i 提交于 2019-11-27 16:05:25

You cannot do this in mysqli:

$stmt->bind_param("ii",0,$victimiid);

The 0 needs to be a variable.

Try this:

$zero = 0;
$stmt->bind_param("ii",$zero,$victimiid);

Watch out! mysqli_stmt::bind_param accepts a reference to a variable, not a constant value. Therefore you have to create a variable to hold that 0 and then reference that variable instead.

$i = 0;
$stmt->bind_param("ii", $i, $victimiid);

Make 0 a variable or include it directly in your query.

$zero = 0;
$stmt->bind_param("ii", $zero, $victimiid);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!