04.05.2014, 18:41
Good morning.
I have a function to check whether the id in my database is used or not.
However it is not as super method.
A loop would be better?
Voici le code actuel:
Here is the current code:
And i use:
Thanks
I have a function to check whether the id in my database is used or not.
However it is not as super method.
A loop would be better?
Voici le code actuel:
Here is the current code:
pawn Код:
stock IDExistantWeed()
{
new str[50], weedID = 1;
format(str, sizeof(str), "SELECT * FROM srp_players_weed WHERE id=%d LIMIT 1", weedID);
mysql_query(str);
mysql_store_result();
if(mysql_num_rows() > 0)
{
}
else printf("Pas de weed ID SQL: %i", weedID);
mysql_free_result();
return 1;
}
pawn Код:
idzeub = IDExistantWeed();
WeedInfo[idzeub][ID] = idzeub;
...