PDA

View Full Version : Joindate question.


Robert Basil
06-28-2002, 07:53 PM
I have a hack that tracks the last days signups using:


$registrations=$DB_site->query("SELECT COUNT(*) AS count,username,userid,posts FROM user WHERE joindate > ". mktime(0,0,0,date("m"),date("d"),date("Y")) ." GROUP BY username order by username ASC");


What do I change in the code to have it check for the past 7 days?

Thanks!

Scott MacVicar
06-28-2002, 07:57 PM
Use

$registrations=$DB_site->query("SELECT COUNT(*) AS count,username,userid,posts FROM user WHERE joindate > ". mktime(0,0,0,date("m"),date("d")-7,date("Y")) ." GROUP BY username order by username ASC");