Advertisement
Kimeraweb

Untitled

Jul 1st, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1. <?php
  2. mysql_connect("127.0.0.1","root","") or DIE ("No se pudo establecer conexion con el servidor.");
  3. mysql_select_db("unturned") or DIE ("No se pudo conectar a la base de datos.");
  4.  
  5. $query = mysql_query("Select * from ranks order by points Desc limit 10");
  6.  
  7. echo "<table>";
  8. echo "<tr><td>SteamId</td><td>Name</td><td>Points</td><td>CharName</td><td>Total Play Time</td><td>Balance</td></tr>";
  9. while ($a=mysql_fetch_array($query))
  10. {
  11.     // Player info
  12.     $playerInfo = mysql_fetch_array(mysql_query("Select * from playerinfo where SteamID=".$a['steamId']));
  13.     // Uconomy
  14.     $uconomy = mysql_fetch_array(mysql_query("Select * from uconomy where SteamID=".$a['steamId']));
  15.     echo "<tr><td>".$a['steamId']."</td><td>".$a['lastDisplayName']."</td><td>".$a['points']."</td><td>".playerInfo['CharName']."</td><td>".$playerInfo['TotalPlayTime']."</td><td>".$uconomy['balance']."</td></tr>";
  16. }
  17.  
  18. echo "</table>";
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement