17.03.2012, 09:59
I'm trying to make a stock to know if a player is registred or not, but isn't working , the code seems alright to me but some help will be apreciated
pawn Код:
stock IsUsernameRegistred( usernm[])
{
new query[24];
format(query, sizeof(query),"SELECT * FROM playerdb WHERE username = '%s'", usernm);
mysql_query(query);
mysql_store_result();
printf(" rows.. = %d", mysql_num_rows());
printf("%s",usernm);
if(mysql_num_rows() != 0)
{
printf(" Player Registred ");
}
else
{
printf(" Player Not Registred ");
}
mysql_free_result();
return 1;
}