Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once("connect_db.php");
- $sql = "set @x = 0;# MySQL returned an empty result set (i.e. zero rows).\n"
- . "\n"
- . "update stats A\n"
- . "inner join\n"
- . "(\n"
- . " select @x:=@x+1 newposition,nick\n"
- . " from stats\n"
- . " order by score DESC\n"
- . ") B using (nick)\n"
- . "set A.score_rank=B.newposition;# 16 rows affected.\n"
- . "";
- if(mysql_query($sql))
- echo 'Bravo';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement