Cronic Posted January 7, 2012 Posted January 7, 2012 What i'm doing wrong? <div id="right_c"><div class="g_content"><h3> Mobsters Online</h3><div class="g_text"> <? echo '<center><p>Users Online In The Last 15 Minutes</p></center>'; $result = mysql_query("SELECT * FROM `grpgusers` ORDER BY `lastactive` DESC"); echo '<table width="100%">'; echo '<tr>'; echo '<td><b>Username</b></td>'; echo '<td><b>Active</b></td>'; echo '</tr>'; if ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $secondsago = time()-$line['lastactive']; if ($secondsago<=900) { $user_online = new User($line['id']); echo "<center><tr><td>".$user_online->formattedname."</td><td>".howlongago($user_online->lastactive)."</td></center>"; } } echo '</table>'; echo '</td></tr>'; ?> </div> </div> </div> Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Webhosting\xampp\htdocs\Cronic Engine\home.php on line 23 I'm trying to list the Mobsters online at the Home page. I am running it on my localhost server, mySQL database is connected, yet it doesn't work. :( Quote
Cronic Posted January 7, 2012 Author Posted January 7, 2012 [ATTACH=CONFIG]239[/ATTACH] Nevermind, got it fixed. ;) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.