Commands out of sync; you can#39;t run this command now 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
 
				
         
 
            
        基础教程推荐
- 从字符串 TSQL 中获取数字 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
 
    	 
    	 
    	 
    	 
    	 
    	 
    	 
    	 
						 
						 
						 
						 
						 
				 
				 
				 
				