Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

sql statements...

Quote Reply
sql statements...
Ok, i'm a little stumped :P

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
Subject Author Views Date
Thread sql statements... joet 2200 Feb 7, 2003, 4:19 PM
Thread Re: [joet] sql statements...
yogi 2160 Feb 8, 2003, 3:11 AM
Thread Re: [yogi] sql statements...
joet 2142 Feb 12, 2003, 12:28 PM
Post Re: [joet] sql statements...
Jagerman 2137 Feb 12, 2003, 5:28 PM