Dont really understand what you are saying but...
For example.
If i edit the code to this: There is a table called kills.
PHP Code:
formatex(query, charsmax(query), "SELECT COUNT(*) FROM mix_players WHERE kills = '%d'", pKills[id]);
In the console it gets the number correctly. The number is 7 thats my kill count.
But when it prints out it to the server it says 2.
Whats the error?