06.04.2011, 22:01
Try like this, but Im not expert in SQL yet
pawn Код:
stock IsUserNameAvailable(playername[])
{
new esc[24],query[256];
mysql_real_escape_string(playername,esc);
format(query,sizeof(query),"SELECT COUNT(username) FROM `users` WHERE `username`='%s'",esc);
mysql_query(query);
mysql_store_result();
if(mysql_fetch_int() > 0) { return 0; }
else { return 1; }
}