Drezard Posted March 10, 2007 Share Posted March 10, 2007 Hello What does this error mean? Fatal error: Non-abstract method USERS::user_numberonline() must contain body in C:\Program Files\xampp\htdocs\wintersword\includes\users.php on line 310 Cheers, Daniel Link to comment https://forums.phpfreaks.com/topic/42071-php-error/ Share on other sites More sharing options...
redarrow Posted March 10, 2007 Share Posted March 10, 2007 can not see the error anyone see it? Link to comment https://forums.phpfreaks.com/topic/42071-php-error/#findComment-204049 Share on other sites More sharing options...
redarrow Posted March 10, 2007 Share Posted March 10, 2007 post users.php the error line below and above ok. Link to comment https://forums.phpfreaks.com/topic/42071-php-error/#findComment-204052 Share on other sites More sharing options...
Drezard Posted March 10, 2007 Author Share Posted March 10, 2007 Error: Fatal error: Non-abstract method USERS::user_numberonline() must contain body in C:\Program Files\xampp\htdocs\wintersword\includes\users.php on line 310 } function user_numberonline(); $timestamp = date(YmdGi); $old_timestamp = $timestamp - 5; $query = "SELECT * FROM user_ids WHERE timestamp > '$old_timestamp'"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); $count = mysql_num_rows($result); echo "<p>Users online: $count</p>"; } Cheers, Daniel Link to comment https://forums.phpfreaks.com/topic/42071-php-error/#findComment-204096 Share on other sites More sharing options...
per1os Posted March 10, 2007 Share Posted March 10, 2007 Im not rocket scientist but shouldin't it be setup like this? function user_numberonline() { $timestamp = date(YmdGi); $old_timestamp = $timestamp - 5; $query = "SELECT * FROM user_ids WHERE timestamp > '$old_timestamp'"; $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); $count = mysql_num_rows($result); echo "<p>Users online: $count</p>"; } --FrosT Link to comment https://forums.phpfreaks.com/topic/42071-php-error/#findComment-204098 Share on other sites More sharing options...
JasonLewis Posted March 10, 2007 Share Posted March 10, 2007 the date string should be in quotation marks: $timestamp = date("YmdGi"); Link to comment https://forums.phpfreaks.com/topic/42071-php-error/#findComment-204102 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.