PDA

View Full Version : Total Posts between X and Y


Automated
12-05-2002, 11:56 AM
Hi,

I am going to run a promotion on my forum where i will give a free domain to the top poster between two dates, these need to be defined by me.

If there a hack that will let me show a table of top posters between these two dates?

Thanks
Matthew

Xenon
12-05-2002, 12:46 PM
Hmm, if it's just for you, you can simply run a query in phpmyadmin:

SELECT DISTINCT(userid),COUNT(postid) AS posts
FROM post
WHERE userid > 0 AND post.dateline>=startdate AND post.dateline<=enddate
GROUP BY userid
ORDER BY posts DESC

you'll get the userids then (at least you should ;))

Automated
12-05-2002, 08:58 PM
Thanks!

that would be fine, but where do i enter the dates? or could you explain dateline to me :confused:


Thanks
Matthew

Xenon
12-06-2002, 11:40 AM
you should use the mktime function of php to get the dateline

http://www.php.net/manual/en/function.mktime.php

Automated
12-08-2002, 12:08 PM
thanks :p

Automated
12-10-2002, 08:55 AM
i cant do it! Could anyone explain it in lamens terms for me :confused:

Thanks
Matthew