10.02.2014, 08:16
Before you ban try this(Simple Way):
Then use mysql_num_rows to get if any row exists.
If it returns 0 then the user doesn't exist.
Or check after you send the BAN query.If it returns a value then the player has been banned or else nothing happens to the database and you'll come to know that user doesn't exist.This method eliminates an additional query.
Quote:
SELECT Username FROM 'your_table' WHERE Username='PLAYERNAME' |
If it returns 0 then the user doesn't exist.
Or check after you send the BAN query.If it returns a value then the player has been banned or else nothing happens to the database and you'll come to know that user doesn't exist.This method eliminates an additional query.