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
基础教程推荐
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 无法解决整理冲突 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
