PieAndChips
08-28-2003, 10:19 AM
Hi, can someone suggest why this query isnt working?
SELECT thread.threadid, COUNT(post.postid) AS posts
FROM thread
INNER JOIN post ON thread.threadid = post.threadid
WHERE (UNIX_TIMESTAMP()-post.dateline) < 86400
GROUP BY thread.threadid, COUNT(post.postid)
ORDER BY COUNT(post.postid) DESC
when i test it in phpMyAdmin i get an invalid use of group function error.
cheers.
SELECT thread.threadid, COUNT(post.postid) AS posts
FROM thread
INNER JOIN post ON thread.threadid = post.threadid
WHERE (UNIX_TIMESTAMP()-post.dateline) < 86400
GROUP BY thread.threadid, COUNT(post.postid)
ORDER BY COUNT(post.postid) DESC
when i test it in phpMyAdmin i get an invalid use of group function error.
cheers.