Ik heb deze query:
SELECT
a.id,
a.title,
a.imageUrl AS articleImageUrl,
a.date,
c.imageUrl AS catImageUrl,
COUNT(r.replyID) AS aant_replies
FROM
gamercc_article a,
gamercc_article_cats c_koppel,
gamercc_category c
LEFT JOIN
gamercc_articlereply r
ON
a.id = r.articleID
WHERE
a.articleType = 'news'
AND
a.id = c_koppel.aid
AND
c.id = c_koppel.cid
AND
DATE_ADD(a.date, INTERVAL 3 DAY) >= NOW()
GROUP BY
a.id
ORDER BY
date DESC
Daarop geeft hij deze error:
Invalid query: Unknown column 'a.id' in 'on clause'
Wil iemand misschien de query ombouwen? Misschien beetje veeleisend, maar ik kom er niet uit :S
PS: Ik wil wel met JOIN blijven werken, want ik moet nog een hele website omzetten naar de nieuwe versie, en om er nou allemaal WHERE's voor te gaan gebruiken... Dat is met iets te veel werk.