这就是为什么@a1ex07的答案提到使用mysqli_multi_query()并循环直到mysqli_next_result()没有更多的结...
30.mysqli::query ( string $query [, int $resultmode = MYSQLI_STORE_RESULT ] ) 对数据库执行一次查询 其后第二个参数默认为MYSQLI_STORE_RESULT,也可以是MYSQLI_USE _RESULT,他们的区别是 mysql_use_result()的结果必须“一次性用完”,也就是说用它得到一个result后,必须反复用mysql_fetch_row()读取...
EN您可以使用mysqli_store_result()从外部查询中预取所有行。这将在MySQL客户端中缓冲它们,因此从服务...
あらゆる呼び出しは 'out of sync' を返します */ mysqli_query($link, "SET @a:='this will not work'"); ]]> diff --git a/reference/mysqli/mysqli_result/construct.xml b/reference/mysqli/mysqli_result/construct.xml index c7977ad6974..d6ac77ff5a1 100644 --- a/reference/mysqli/...
If you executemysqli_query()withresultmodeMYSQLI_USE_RESULTall subsequent calls will return errorCommands out of syncunless you callmysqli_free_result(). Return values 如果成功则返回TRUE,失败则返回FALSE。 ForSELECT, SHOW, DESCRIBEorEXPLAINmysqli_query()will return a result object. ...
After calling this procedure in php i try to get result (id field) with function mysqli_fetch_assoc, but it gives error number 2014 (Commands out of sync; you can't run this command now). If i put SELECT out of my procedure mysqli_fetch_assoc works fine, but i want SELECT inside...
Getting "Error: Commands out of sync; you can't run this command now" after running a multi-query? Make sure you've cleared out the queue of results.Here's what I've used to discard all subsequent results from a multi-query:<?phpwhile($dbLink->more_results() && $dbLink->next_resul...
あらゆる呼び出しは 'out of sync' を返します */ mysqli_query($link, "SET @a:='this will not work'"); ]]> diff --git a/reference/mysqli/mysqli_result/construct.xml b/reference/mysqli/mysqli_result/construct.xml index c7977ad6974..d6ac77ff5a1 100644 --- a/reference/mysqli/...