16.09.2012, 13:53
Does the table USERS exist? Does the variable USERNAME in table USERS exist?
Try this. Check console and tell me if any error popped up.
pawn Код:
CheckAccountExists(account[])
{
new string[128];
format(string, sizeof(string), "SELECT * FROM `users` WHERE `username`= '%s'", account);
new q = mysql_query(string);
if(!q) return printf("Query did not work. %d",mysql_errno());
mysql_store_result();
new value;
value = mysql_num_rows(Handle);
mysql_free_result(Handle);
return value;
}