ugh.. duh... don't know why I didn't try just adding:
I now have:
threads.updated AS last_post_time,
threads.last_post_id AS last_post_id,
posts.subject AS subject,
users.id AS user_id,
users.user_name AS user_name,
COUNT(posts.thread_id) - 1 AS replies
FROM threads,
posts,
users
WHERE threads.id = posts.thread_id AND
users.id = posts.user_id
GROUP BY threads.id
ORDER BY threads.updated DESC
Philip
------------------
Limecat is not pleased.
Code:
count(posts.thread_id)I now have:
Code:
SELECT threads.id AS thread_id, threads.updated AS last_post_time,
threads.last_post_id AS last_post_id,
posts.subject AS subject,
users.id AS user_id,
users.user_name AS user_name,
COUNT(posts.thread_id) - 1 AS replies
FROM threads,
posts,
users
WHERE threads.id = posts.thread_id AND
users.id = posts.user_id
GROUP BY threads.id
ORDER BY threads.updated DESC
Philip
------------------
Limecat is not pleased.