mysql5里运行正常,MYSQL4失败.急...
兄弟,这个在MYSQL5里正常,在4里却提示错误,能帮忙解答一下么.感激SELECTnicknameFROMqun_supe_userfieldsWHEREuidIN(S...
兄弟,这个在MYSQL5里正常,在4里却提示错误,能帮忙解答一下么.感激
SELECT nickname
FROM qun_supe_userfields
WHERE uid
IN (
SELECT qun_supe_userspaces.uid
FROM supe_qun_userspaces
WHERE qun_supe_userspaces.uid = '$value[uid]'
);
提示错误:
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select qun_supe_userspaces.uid from
supe_qun_userspaces where
是的,不支持子查询.他们跟我说要用 LEFT JOIN来代替,但我不知道具体该怎么代替,我用LEFT JOIN代替IN,错误了.有谁知道完整的语句该怎么写么? 展开
SELECT nickname
FROM qun_supe_userfields
WHERE uid
IN (
SELECT qun_supe_userspaces.uid
FROM supe_qun_userspaces
WHERE qun_supe_userspaces.uid = '$value[uid]'
);
提示错误:
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select qun_supe_userspaces.uid from
supe_qun_userspaces where
是的,不支持子查询.他们跟我说要用 LEFT JOIN来代替,但我不知道具体该怎么代替,我用LEFT JOIN代替IN,错误了.有谁知道完整的语句该怎么写么? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询