Ok, i'm a little stumped :P
How do I do this....
SELECT post_root_id, post_subject, ..., count(post_id) as num_new_replies
FROM gforum_Post
WHERE post_time > UNIX_TIMESTAMP(DATE_SUB(now(), INTERVAL 1 DAY))
GROUP BY post_root_id
ORDER BY num_new_replies DESC
LIMIT 100;
What I can't figgure out how to use Gossamer's SQL object to do the "SELECT *, count(post_id) as num_new_replies" part above.
What I'm trying to do is to write a global that will return a list of discussions that have had the most replies in the past 24 hours.
Thanks,
Joe
--
Christianity.com Forums
How do I do this....
Code:
SELECT post_root_id, post_subject, ..., count(post_id) as num_new_replies
FROM gforum_Post
WHERE post_time > UNIX_TIMESTAMP(DATE_SUB(now(), INTERVAL 1 DAY))
GROUP BY post_root_id
ORDER BY num_new_replies DESC
LIMIT 100;
What I can't figgure out how to use Gossamer's SQL object to do the "SELECT *, count(post_id) as num_new_replies" part above.
What I'm trying to do is to write a global that will return a list of discussions that have had the most replies in the past 24 hours.
Thanks,
Joe
--
Christianity.com Forums