命令不同步;您现在不能运行此命令SQL [英] Commands out of sync; you can't run this command now SQL

查看:88
本文介绍了命令不同步;您现在不能运行此命令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

推荐答案

参考如果命令不同步;您现在无法在客户端代码中运行此命令,您以错误的顺序调用了客户端函数.

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆