country is not achieved into musql table - 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: country is not achieved into musql table (
/showthread.php?tid=658004)
country is not achieved into musql table -
severance - 20.08.2018
PHP код:
GetPlayerCountry(playerid, str2, sizeof(str2));
mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `country` = %s WHERE `id` = %d LIMIT 1",str2, pInfo[playerid][ID]);
mysql_tquery(g_SQL, query);
PHP код:
`country` varchar(24) NOT NULL
Re: country is not achieved into musql table -
XStormiest - 20.08.2018
Код:
GetPlayerCountry(playerid, str2, sizeof(str2));
mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `country` = '%s' WHERE `id` = '%d' LIMIT 1",str2, pInfo[playerid][ID]);
mysql_tquery(g_SQL, query);
try this?
Re: country is not achieved into musql table -
severance - 20.08.2018
not working
Re: country is not achieved into musql table -
KinderClans - 20.08.2018
pawn Код:
new Country[128];
GetPlayerCountry(playerid,Country);
mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `country` = '%s' WHERE `id` = '%d' LIMIT 1", Country, pInfo[playerid][ID]);
mysql_tquery(g_SQL, query);
Also there is no need for
LIMIT 1.
Re: country is not achieved into musql table -
severance - 20.08.2018
Love you, works like charm