Powergamers and achievements

(powergamers not working properly yet)
I need help with the "ORDER BY"
````
$znotePlayers = mysql_select_multi('SELECT * FROM `players` `a` JOIN `znote_players` `b` ON `a`.`id` = `b`.`id`  WHERE `a`.`group_id` < 2 ORDER BY `a`.`experience`-`b`.`exphist_lastexp` DESC LIMIT ' . $limit);
````
Currently it doesn't subtract the 'experience' from 'exphist_lastexp'
Awesome idea, but it redicts to index.php ;o?
		echo '<td><a href="characterprofile.php?name="' .$player['name']. '">' .$player['name']. '</a>';

Because of the characterprofile url rewriting or something.