Help for request MySQL. - 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: Help for request MySQL. (
/showthread.php?tid=515698)
Help for request MySQL. -
TheSy - 27.05.2014
Good morning.
I have a system of planting weed.
All this is stored in a table and I have a column 'planter'
So I want to compare the planters of the table with the nickname of the player and if he has already made more than three plants can no longer do.
Thank you!
Re : Help for request MySQL. -
S4t3K - 27.05.2014
strcmp +
cache_get_field_content
Re: Help for request MySQL. -
TheSy - 27.05.2014
I use MySQL R5
Re: Help for request MySQL. -
iRaiDeN - 27.05.2014
i don't understand what you need?
Re: Help for request MySQL. -
TheSy - 27.05.2014
I want a SQL query that compares the nickname of the player with my column "Planter" and then if the player's name as "Planter" appears more than 5 times does not allow planting
I'm not english ^^
Re : Help for request MySQL. -
S4t3K - 27.05.2014
So
strcmp +
mysql_fetch_field_row will do the job I think.
Re: Help for request MySQL. -
TheSy - 27.05.2014
pawn Код:
mysql_query("SELECT COUNT(Planteurs) FROM srp_players_weed");
mysql_store_result();
if(!mysql_num_rows()) return mysql_free_result(), 1;
new field[256], entry;
while(mysql_retrieve_row())
{
mysql_get_field("Planteur", WeedInfo[entry][Planteur]);
entry++;
}
mysql_free_result();
And then?
How can I do to compare with the nickname of the player who wants to plant and that of the Planter column for obstructing him if he has three plantations in progress?
Re: Help for request MySQL. -
TheSy - 27.05.2014
upppp