alexw0w Posted January 29, 2012 Posted January 29, 2012 configs.php <? $servidor = "127.0.0.1"; $usuario = "root"; $clave = "pass"; $logon = "logon"; $char = "characters"; $world = "world"; $conecta = mysql_connect($servidor, $usuario, $clave) or die("No se ha podido conectar con el servidor MySQL. Int�ntalo mas tarde."); ?> players_on.php <?php include("configs-php"); $online = '1'; $playerson = mysql_query("SELECT * FROM $char.characters WHERE online='".$online."'"); $playerson1 = mysql_num_rows($playerson); ?> Players online : <b><?=$playerson1?></b> Quote
h2.havok Posted January 29, 2012 Posted January 29, 2012 This will only work on a <4.x server as the online field is obsolete in 4.x and since removed. Quote
wazy Posted January 30, 2012 Posted January 30, 2012 characters.characters... if online is 1 then online. 0 is offline. Quote
alexw0w Posted February 1, 2012 Author Posted February 1, 2012 characters.characters... if online is 1 then online. 0 is offline. but this works just from the database of the characters Quote
h2.havok Posted February 2, 2012 Posted February 2, 2012 Oh wow, how did I miss that field. For some reason I though this was a server online script rather than a players online script, my apologies. Quote
wazy Posted February 2, 2012 Posted February 2, 2012 Your title is "Online players script" not accounts... so I simply gave you an alternate way @Will . Quote
alexw0w Posted February 3, 2012 Author Posted February 3, 2012 Your title is "Online players script" not accounts... so I simply gave you an alternate way @Will . happy? and I put the players 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.