本文介绍了EXISTS子查询导致错误1064的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我上次PLESK更新到12.0.18#70以来,我使用带有 EXISTS子查询的选择语句对phpMyAdmin遇到了问题.

since my last PLESK Update to 12.0.18 #70, I have a problem with phpMyAdmin using select statements with EXISTS subqueries.

如果我仅从MariaDB网站上获取示例(我已经在数据库中使用实际的表和字段对其进行了测试):

If I take simply the example from the MariaDB website (I tested it with real tables and fields on my DB):

SELECT col1 FROM t1 WHERE EXISTS (SELECT * FROM t2)

解释器迅速在" EXISTS "和"(SELECT ""下划线,显示错误1064

Quickly the interpreter underlines "EXISTS" and the "(SELECT" to show the error 1064

#1064 - You have an error in your SQL syntax;

1.  unknown keyword (near "EXISTS" at position 30)
2.  unexpected character (near "(" at position 37)

重要信息:使用PHP代码在我的MariaDB(10.0.20)服务器上,Select语句可以正常工作.只有phpMyAdmin告诉我语法错误.

Important to know: The Select statements works fine on my MariaDB (10.0.20) server using PHP code. Only phpMyAdmin tells me that there is a syntax error.

是否存在EXISTS?

Is EXISTS depricated?

谢谢!

[phpMyAdmin 4.5.0.2和MariaDB]

[phpMyAdmin 4.5.0.2 and MariaDB]

推荐答案

这是4.5.0(.x)版本中一系列不幸的错误的一部分.当前的最新版本是4.5.2,并且该错误已在该版本中修复;我建议您升级.

That was part of an unfortunate series of bugs with the 4.5.0(.x) releases. The latest version is currently 4.5.2 and this bug has been fixed in that version; I suggest that you upgrade.

这篇关于EXISTS子查询导致错误1064的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 12:20