使用wampServer 3.0.6 + MySQL的5.7.14,没有我的子查询的在FROM子句中工作了,而使用wampServer 2.5 + MySQL的5.6.17在另一台电脑上,它是完美的工作。
这里有数十他们 中这些查询的2例(请注意,在现实中,这些例子被用作较大的子查询的,但不个别地工作):子查询中从不使用新版本wampserver工作了条款
查询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
最重要的是,写作论文在phpMyAd查询分钟(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)
这些都不与前/其他版本的发生。
因为它是系统,它是不是由于查询时自我的内容,但它看起来更象是被“错”与新的配置...
没有人有任何可以做什么的想法?
如果你单独检查子查询是否工作? – Ikrom
@Ikrom ...是的,他们都没有任何问题的工作。从1版本到另一版本,我没有改变任何东西,无论如何...它仍然应该工作。 – Pve
如果您使用简单查询进行测试,例如:'select t1。* from(select * from members_relations)as t1;'。是否同样的错误? – Ikrom