SA-MP Forums Archive
Clear Query[]; - 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: Clear Query[]; (/showthread.php?tid=558263)



Clear Query[]; - StasWilson - 16.01.2015

new query[100];
public Testing()
{
mysql_format(DBHandle, query, sizeof(query), "INSERT INTO `test` VALUES ('','%s');",query);
mysql_tquery(DBHandle, query, "", "");
query[0] = '\0';
}
Whether it is possible to clear so everywhere (query[0] = '\0' it is possible to use so every time to avoid creation of every time new query[100]; ?


Re: Clear Query[]; - StasWilson - 16.01.2015

and as I told that it, perhaps, so or better isn't unnecessary?


Re: Clear Query[]; - RedFusion - 16.01.2015

It is possible by hooking your mysql functions, seems like a lot of hassle for nothing though. You're better of using different sized strings accordingly to the max length of your query. Locally, as ****** said.