php初学者,遇到调用存储过程的问题,求大神解答Warning: mysqli_fetch_array() expects parameter 1 to be 5
<?php$db=newmysqli('localhost','root','','my');if(mysqli_connect_errno()){echo'Cannot...
<?php
$db = new mysqli('localhost','root','','my');
if (mysqli_connect_errno()){
echo 'Can not connect to MySQL server';
}
$db->query("SET NAMES gbk");
$result =mysqli_query($db,"call sp_select2(2)");
while($row = mysqli_fetch_array($result,MYSQLI_ASSOC))
{echo $row['Customer_name'];}
$result =mysqli_query($db,"call sp_select2(2)");
while($row = mysqli_fetch_array($result,MYSQLI_ASSOC))
{echo $row['Customer_name'];}
?>
报错Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result
为什么不能连续两次调用 展开
$db = new mysqli('localhost','root','','my');
if (mysqli_connect_errno()){
echo 'Can not connect to MySQL server';
}
$db->query("SET NAMES gbk");
$result =mysqli_query($db,"call sp_select2(2)");
while($row = mysqli_fetch_array($result,MYSQLI_ASSOC))
{echo $row['Customer_name'];}
$result =mysqli_query($db,"call sp_select2(2)");
while($row = mysqli_fetch_array($result,MYSQLI_ASSOC))
{echo $row['Customer_name'];}
?>
报错Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result
为什么不能连续两次调用 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询