Home > Backend Development > PHP Tutorial > Warning: mysqli_error() expects exactly 1 parameter, 0 given in,该怎么解决

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

WBOY
Release: 2016-06-13 10:06:20
Original
10545 people have browsed it

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)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template