首頁 >後端開發 >php教程 >Warning: mysqli_error() expects exactly 1 parameter, 0 given in,该怎么解决

Warning: mysqli_error() expects exactly 1 parameter, 0 given in,该怎么解决

WBOY
WBOY原創
2016-06-13 10:06:2010542瀏覽

Warning: mysqli_error() expects exactly 1 parameter, 0 given in
存储过程执行没有问题,@o_userid在ems sqlmanage下测试也有值,但是在php下边调用就会报错,请高手指点一下?

$sql = "CALL UserCheck(@o_userid,'".$userName."','".$usrPass."');";
$conn = db_connect();
if($result = mysqli_query($conn,$sql) or die(mysqli_error()))
{
$rs = mysqli_query($conn,"select @o_userid") or die(mysqli_error()); //这一句报错?
$row = $rs->fetch_array();

Warning: mysqli_error() expects exactly 1 parameter, 0 given in E:\biyie\htdocs\pilin\data\loginusermiddle.php on line 19
$row = $rs->fetch_array();

------解决方案--------------------
mysqli_error()需要参数。。。

mysqli_error($conn)

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn