Basicially my question is: is that # above in seconds? And when from? If I minus 1209600 from it will that be two weeks ago?
Ahh, this is getting a bit confusing... how is the lastactivity string formatted?
If I do
Code:
$postsresult = mysql_query("SELECT userid,username,email,icq,posts,lastactivity FROM user WHERE usergroupid=9 ORDER BY lastactivity desc") or die("Unable to complete query");
while ($topposters = mysql_fetch_array($postsresult)):
if (($counter++ % 2) != 0) {
$bc=$bc1;
} else {
$bc=$bc2;
}
$lasta = $topposters[lastactivity];
$date = date("D, F j, G:i:s",$lasta);
$datea = date("Y-m-d",$lasta);
if(($datea) < ((date("Y-m-d", mktime(0,0,0, date(m), date(d)-7,date(Y))))) {
$bc=$wa;
}
if(($datea) < ((date("Y-m-d", mktime(0,0,0, date(m), date(d)-14,date(Y))))) {
$bc=$wb;
}
Will this work?