mysql查询出错,尝试连接表

时间:2010-04-07 17:48:31

标签: mysql

有人能看出为什么这段代码会返回错误吗?

    "SELECT
a.widget_id,
c.additional_widget_id
FROM
exp_widgets AS a,
INNER JOIN exp_widget_additional AS c ON a.entry_id = c.additional_entry_id
WHERE
a.template = 3
AND
c.additional_template_id = 3
AND
(a.entry_id = 6 OR c.additional_entry_id = 6)
";

任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:3)

你有一个流氓逗号:

...
exp_widgets AS a,
INNER JOIN exp_widget_additional`
...

应该是

...
exp_widgets AS a
INNER JOIN exp_widget_additional
...