Joined: Aug 27, 2002 Posts: 16976 Location: Kansas
Posted:
Thu Jul 21, 2005 11:24 am
Well, I managed to introduce a bug in all my fiddling . the previous day's registration got screwed up again, so I have rewritten th whole routine. I have corrected the download, but you can do the following to correct your v2.0.0 code.
Correct version number to 2.0.1 from 2.0.0 In block-UserInfo.php FIND
//Executing SQL For Today and Yesterday
$userCount = 0;
$userCount2 = 0;
$sql = "SELECT user_regdate, COUNT(user_regdate) FROM ".$user_prefix."_users WHERE user_regdate LIKE '$curDate2' OR user_regdate LIKE '$curDateP' GROUP BY user_regdate LIMIT 0,2";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row[0]==substr($month,0,3).' '.$mday.', '.$year) $userCount = $row[1];
else $userCount2 = $row[1];
}
REPLACE WITH
Code:
//Executing SQL For Today and Yesterday
$userCount = 0;
$userCount2 = 0;
$Today = date('M d, Y',time());
$Yesterday = date('M d, Y',time()-86400);
$sql = "SELECT user_regdate, COUNT(user_regdate) FROM ".$user_prefix."_users where user_regdate IN('$Today', '$Yesterday') GROUP BY user_regdate LIMIT 0,2";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row[0]==$Today) $userCount = $row[1];
else $userCount2 = $row[1];
}
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum