Skip to content

Unable to list online accounts #9

@hysel

Description

@hysel

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions