Guest User

Untitled

a guest
Mar 10th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <?php
  2. $host="localhost";
  3. $user="admin";
  4. $pass="root";
  5. $db_name="game";
  6. $link=mysql_connect($host,$user,$pass);
  7. mysql_select_db($db_name,$link);
  8. mysql_query("SET NAMES utf8");
  9. $sql = mysql_query("SELECT `nickname`, `gold` FROM `users` ORDER BY `gold` DESC LIMIT 3");
  10. $rows = mysql_fetch_assoc($sql);
  11. foreach ($rows as $value)
  12. {
  13. echo "$value";
  14. }
  15. ?>
Add Comment
Please, Sign In to add comment