SA-MP Forums Archive
About MySQL R39-2 - 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: About MySQL R39-2 (/showthread.php?tid=530605)



About MySQL R39-2 - Affan - 08.08.2014

So I have been using R7 for a while and I decided to use R39-2.

So i'm wondering do I have to store the result, and free the result every time in an example like this?

pawn Код:
format(query, sizeof(query), "SELECT * FROM `players` WHERE `Username` = '%s'", GetName(playerid));
    mysql_tquery(chandle, query, "CheckAccount", "d", playerid);
or do I have to do
pawn Код:
format(query, sizeof(query), "SELECT * FROM `players` WHERE `Username` = '%e'", GetName(playerid));
    mysql_tquery(chandle, query, "CheckAccount", "d", playerid);



Re: About MySQL R39-2 - Inn0cent - 02.09.2014

A little explanation:




Re: About MySQL R39-2 - Jack_Leslie - 02.09.2014

I think it's just easier to use mysql_format and use the %e specifier as stated above.