我无法弄清楚为什么这个查询不起作用。名称已经过清理,因为这是专有代码。
QRY:
SELECT l.albert, o.ben, m.caleb, m.dennis, m.edgar
FROM octopus o, lorax l, monkey m
WHERE o.ben = l.ben
AND l.franklin= m.franklin
AND o.ben= :ben
ORDER BY l.albert DESC
LIMIT 1
这是我得到的错误:
MySQL Error: 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 'QRY: SELECT l.albert, o.ben, m.caleb, m.dennis, m' at line 1
答案 0 :(得分:4)
好像你有
"QRY: "
在您的查询开头。它应该以
开头"SELECT ...