命令不同步;你现在不能运行这个命令 SQL
已经浏览了论坛,但无法解决此问题:命令不同步;你现在不能运行这个命令 SQL
have looked through the forums already but have been unable to solve this problem: Commands out of sync; you can't run this command now SQL
我的查询是:
SELECT Car.*, Building.*, CarType.*
FROM Car
INNER JOIN Building
ON Car.BuildingID=Building.BuildingID
INNER JOIN CarType
ON Car.CarType=CarType.TypeID
WHERE Car.CarID <> (SELECT CarID FROM Requests WHERE Status = 'Accepted')
任何帮助表示赞赏.谢谢
Any help appreciated. thank you
推荐答案
REFER 文档在这里
如果命令不同步;您现在无法在客户端代码中运行此命令,您以错误的顺序调用客户端函数.
If you get Commands out of sync; you can't run this command now in your client code, you are calling client functions in the wrong order.
这可能发生,例如,如果您正在使用 mysql_use_result() 并尝试在调用 mysql_free_result() 之前执行新查询.如果您尝试执行两个返回数据的查询而没有在其间调用 mysql_use_result() 或 mysql_store_result() ,也会发生这种情况.
This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.
在进行下一个查询之前,您需要使用/存储结果.
You need to use/store result before you can proceed with next query after.
另一种选择是关闭连接并重新启动.
Another alternative is to close the connection and starts it again.
相关文章