-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi
I notice this section in the index.php
<?php //first you need to define db info define('mySQL_hostname', '127.0.0.1'); //database IP define('mySQL_database', 'swgusers'); //database name define('mySQL_username', 'root'); //database user define('mySQL_password', 'swg'); //database password //connects to mysql $db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password ) or die( 'Error connecting to mysql<br><br>'.mysql_error() ); //connects to Database $db_select = mysql_select_db( mySQL_database, $db_link ) or die( 'Error connecting to Database<br><br>'.mysql_error() ); //selects desired table $chars= mysql_query("SELECT onlineFROMcharacterswhereonline=1"); //tells how much rows are there (will come helpfull with while loops) $rows = mysql_num_rows($chars); echo "<p><strong><font color='#FFFFFF'> Online Players:</font></strong></p><em>".$rows."<em>"; //prints out the $x number of players online ?>
The 'characters' table does not exist, anyway to get the online status?