使用wampServer 3.0.6 + MySQL 5.7.14,FROM子句中的子查询的none不再工作,而在另一台pc上使用wampServer 2.5 + MySQL 5.6.17,它完全可以工作。
以下是其中几十个查询中的两个示例(请注意,实际上,这些示例被用作较大查询的子查询,但也不单独工作):
查询1:
SELECT rnbr.*
FROM
(
SELECT Rct_Pub_Mbr_Id,
COUNT(Rct_Id) AS Nbr
FROM recits
WHERE Rct_Rct_Val_Id = 2 AND
Rct_Pub_Mbr_Id = 2
GROUP BY Rct_Pub_Mbr_Id
) AS rnbr查询2
SELECT base.*
FROM
(
SELECT Mbr_Rel_CRel_Id,
Mbr_Rel_Mbr_Id_2
FROM membres_relations
WHERE Mbr_Rel_Mbr_Id_1 = 16 AND
Mbr_Rel_Mbr_Id_2 = 2 AND
Mbr_Rel_CRel_Id = "BLK"
) AS base 在此基础上,使用phpMyAdmin (4.6.4) SQL选项卡编写这些查询,得到以下错误(从第二个查询中获取的示例):
. on the line with "(" after the FROM clause :
. An expression was expected ( close to ( )
. Unexpected token ( close to ( )
. on the line with SELECT after the "(" :
. this type of clause has already been analised ( close to SELECT )
. on the line with ") AS base" :
. Unexpected token ( close to ) )
. key word not recognized ( close to AS )
. Unexpected token ( close to base )在以前的/其他版本中,所有这些都不会发生。
因为它是系统,所以它是,而不是由于它自己的查询的内容,但是它看起来更像是新配置的“错误”.
有人知道能做些什么吗?
发布于 2017-08-07 12:00:41
我找到解决办法了!
实际上,这是一个Wampserver、MySQL和phpMyadmin版本的问题。如果事情发生在你身上,以下是该做的事情:
我知道看起来很棘手,但很管用.
祝你好运!
https://stackoverflow.com/questions/45533481
复制相似问题