Here is my database structure
https://docs.google.com/open?id=0B9ExyO6ktYcOenZ1WlBwdlY2R3c
My SQL query looks like that
SELECT
u.fullname,
a.id,
a.content,
a.addDT,
a.`right`,
acr.score,
acr.checkDT
FROM
answers a,
users u
LEFT JOIN `answer_chk_results` acr ON acr.aid = a.id
WHERE
a.qid = 7
AND u.id = a.uid
GROUP BY
a.`right` DESC
Getting error message
[Err] 1054 - Unknown column 'a.id' in 'on clause'
I’m pretty sure that a.id column exists
What am I missing?
you can’t mix join syntax with comma delimited table syntax. If you are going to left join, you need to use an inner join for the other two tables.
This might work also, but is not guranteed: