mysql problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql problem (
/showthread.php?tid=326381)
mysql problem -
StuffBoy - 17.03.2012
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;
}
Re: mysql problem -
StuffBoy - 17.03.2012
Solved.. The array of the query was to small *facepalm*,.