我已经为表编写了一个存储过程,之后我在php函数中执行相同表的查询,但我得到错误:
Error in db : Commands out of sync, you can't run the command now..
我也尝试了mysqli: multi_query而不是mysqli:query,但我得到了空输出。有人能帮我解决这个问题吗?
p。S:存储过程工作正常,查询也正确。但是它一起返回错误。
您必须使用所有选择,并导航到下一个结果
$sql="";
if (mysqli_multi_query($link, $sql)) {
do {
if ($result = mysqli_store_result($link)) {
while ($row = mysqli_fetch_array($result)) {
array_push($arrows,$row);
}
mysqli_free_result($result);
}
} while (mysqli_next_result($link));
}