<分区>
我目前正在做以下事情:
$mysqli = new mysqli($server, $username, $password, $database);
$mysqli->multi_query($multiUpdates);
while ($mysqli->next_result()) {;} // Flushing results of multi_queries
$mysqli->query($sqlInserts);
有没有更快的转储结果的方法?
我不需要它们,只想运行下一个查询,但我收到错误:
Commands out of sync; you can't run this command now
问题是 while ($mysqli->next_result()) {;}
需要大约 2 秒,这对于我不想要的东西来说是一种浪费。
还有更好的解决方案吗?