【发布时间】:2014-05-02 09:11:32
【问题描述】:
我有 2 张桌子:
albums (idalbum, idauthor, idcompositor, idfeat)
people (id, firstname, last name)
我当前的查询:
SELECT * FROM albums where idalbum=:id
INNER JOIN people ON albums.idauthor = people.id
INNER JOIN people ON albums.idcompositor = people.id
INNER JOIN people ON albums.idfeat = people.id
我想用我的查询做什么:
[Album], [Author[First Name, Last Name]], [Compositor[First Name, Last Name]], [Feat[First Name, Last Name]]
我的问题:
我有一个错误:SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;
【问题讨论】:
-
你的
auteurs桌子在哪里? -
不是作者,但人们很抱歉
-
大多数情况下,实际上最有用的是错误消息的下一位!
标签: mysql sql inner-join