I have the following MySQL query:
SELECT posts.id, posts.name, LEFT(posts.content, 400), posts.author, posts.date, users.display_name,
GROUP_CONCAT(tags.tag ORDER BY tag_linking.pid ASC SEPARATOR ",") update_tags
FROM posts, tag_linking, tags
INNER JOIN `users`
ON posts.author=users.id;
WHERE tag_linking.pid = posts.id
AND tags.id = tag_linking.tid
ORDER BY posts.date DESC
Which, was you can see, connects three tables etc. etc. Anyway, the problem is that it gives an error:
ERROR CODE:
SQL Error (1054): Unknown column 'posts.author' in 'on clause'
even though this simpler query used on another page works:
SELECT posts.id, posts.name, LEFT(posts.content, 400), posts.author, posts.date, users.display_name FROM `posts`
INNER JOIN `users`
ON posts.author=users.id
Does anyone have thoughts as to why this is occuring? Thanks for your help.