07.04.2011, 19:43
Try this
pawn Код:
stock IsUserNameAvailable(playername[])
{
new esc[24],query2[256];
mysql_real_escape_string(playername,esc);
format(query2,sizeof(query2),"SELECT * FROM `users` WHERE `username`='%s'",esc);
mysql_query(query2);
mysql_store_result();
if(mysql_num_rows()){
mysql_free_result();
return 1;
} else {
mysql_free_result();
return 0;
}
}