How is it right? - 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: How is it right? (
/showthread.php?tid=590804)
How is it right? -
norton2 - 04.10.2015
How is it right? Variant 1 or 2? (Use MYSQL R39-2)
Query or TQuery?
Variant 1
Код HTML:
mysql_format(MySQLCon, query, sizeof(query), "UPDATE `players` SET `Admin`=%d WHERE `ID`=%d", pInfo[id][pAdmin], pInfo[id][pID]);
mysql_tquery(MySQLCon, query);
Variant 2
Код HTML:
mysql_format(MySQLCon, query, sizeof(query), "UPDATE `players` SET `Admin`=%d WHERE `ID`=%d", pInfo[id][pAdmin], pInfo[id][pID]);
mysql_query(MySQLCon, query);
Re: How is it right? -
AbyssMorgan - 04.10.2015
Код:
new buffer[512];
format(buffer,sizeof buffer,"UPDATE players SET Admin='%d' WHERE ID='%d'",pInfo[id][pAdmin],pInfo[id][pID]);
mysql_query(MySQLCon,buffer);
Re: How is it right? -
norton2 - 04.10.2015
Waiting for other opinions.
Re: How is it right? -
Lordzy - 04.10.2015
http://forum.sa-mp.com/showpost.php?...56&postcount=2
Re: How is it right? -
Beckett - 04.10.2015
I'd prefer threaded queries, so Variant 1 it is.
Brief explanation.