the first script seems ok
The php script is like a pain in the ass, is it yours? I would suggest not coding everything in a single call like it does there so it's much easier to develop it. To make sure what's wrong I would first execute the query from some sql console or something, I guess you should have. Of course you should set the player name to the name you are testing. That way you make sure the problem isn't somewhere else. If it works fine I would rewrite that php code like this:
define('INSTATS',true);
require('include/global.inc.php');
if (isset($_GET['name']) && trim($_GET['name']) != '')
{
$name = $_GET['name'];
$query = $sql->query("SELECT
`points`,
`kills`,
`deaths`,
`selfkills`,
`last`
FROM `$options[SQL_TABPREFIX]players`
WHERE `player`='".addslashes($name)."'
LIMIT 1");
$player = $sql->fetcharray($query);
if(!$player) {
die ('Sorry could not find your stats ');
It seems like the same, but I'm not really sure with the "if (!$player = $sql->fet......" part. I don't know if it's right the way it was writen.