命令不同步;你现在不能运行这个命令 SQL

Commands out of sync; you can#39;t run this command now SQL(命令不同步;你现在不能运行这个命令 SQL)

本文介绍了命令不同步;你现在不能运行这个命令 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.

这篇关于命令不同步;你现在不能运行这个命令 SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:命令不同步;你现在不能运行这个命令 SQL

基础教程推荐