Dan13071992
01-16-2012, 11:04 PM
hi guys, im getting an error:
Notice: Object of class stdClass could not be converted to int in /home/tacticsc/domains/360-tactics.co.uk/public_html/crimewave/includes/inc-functions.php on line 108
it is really bugging me as i cant figure out what the problem is, and i just keep looking over line 108 and cant seem to find the problem, line 108 is:
if ($now_online > $most_online){
the whole code is:
$most_online=mysql_fetch_object(mysql_query("SELECT mostonline FROM site_stats WHERE id='1'"));
$timenow=time();
$now_online=mysql_num_rows(mysql_query("SELECT * FROM users WHERE online > '$timenow'"));
if ($now_online > $most_online){
mysql_query("UPDATE site_stats SET mostonline='$now_online' WHERE id='1'");
}
if anyone could point out what the problem is/give me a bit of help to figure this one out, that would be great.
Thanks
Dan
Notice: Object of class stdClass could not be converted to int in /home/tacticsc/domains/360-tactics.co.uk/public_html/crimewave/includes/inc-functions.php on line 108
it is really bugging me as i cant figure out what the problem is, and i just keep looking over line 108 and cant seem to find the problem, line 108 is:
if ($now_online > $most_online){
the whole code is:
$most_online=mysql_fetch_object(mysql_query("SELECT mostonline FROM site_stats WHERE id='1'"));
$timenow=time();
$now_online=mysql_num_rows(mysql_query("SELECT * FROM users WHERE online > '$timenow'"));
if ($now_online > $most_online){
mysql_query("UPDATE site_stats SET mostonline='$now_online' WHERE id='1'");
}
if anyone could point out what the problem is/give me a bit of help to figure this one out, that would be great.
Thanks
Dan