Advertisement
Kimeraweb

Query - TopPK

Mar 7th, 2014
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2.    // Conexion a la base de datos
  3.    mysql_connect("127.0.0.1","root","") or die ("No se pudo conectar al servidor de MySQL");
  4.    mysql_select_db("l2jdb") or die ("No se puedo conectar a la base de datos");
  5.    
  6.   // Query, TOP PK
  7.   $query = "Select * from characters where pkkills>0 order by pkkills desc, limit 10";
  8.   $mk = mysql_query($query);
  9.   while ($a = mysql_fetch_array($mk))
  10.   {
  11.     echo "PJName: ".$a['char_name']." - ".$a['pkkills'];
  12.   }
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement