0
你能发现这个查询有什么问题吗?MySQL:使用Join时出现Syntaxerror?
SELECT * FROM requests
WHERE id = '".$id."'
LEFT JOIN request_data ON (requests.id = request_data.request_id)
GROUP BY requests.id
一直在工作它一段时间,但似乎无法得到它的权利!
数据库看起来是这样的:
-requests
-id
-another column
-and a third one
-request_data
-request_id
-key
-value
编辑:哦,对了,和错误:
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 'LEFT JOIN request_data ON (requests.id = request_data.request_id) GROUP BY ' at line 3
任何想法?
请解释此查询意味着要做什么。为什么你有'WHERE id ='“。$ id。”''和'GROUP BY requests.id'? –