SA-MP Forums Archive
Is mysql_free_result(); necessary to use? - 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: Is mysql_free_result(); necessary to use? (/showthread.php?tid=609776)



Is mysql_free_result(); necessary to use? - Sc0pion - 16.06.2016

Fixed!


Re: Is mysql_free_result(); necessary to use? - Stinged - 16.06.2016

After storing the result of a query, you need to free it.
If you don't, you'll start getting "commands out of sync" errors.
https://sampwiki.blast.hk/wiki/MySQL#mysql_store_result


Re: Is mysql_free_result(); necessary to use? - Sc0pion - 16.06.2016

Fixed!


Re: Is mysql_free_result(); necessary to use? - Sjn - 16.06.2016

This is only used when you store your results using mysql_store_result. And it's not like every clause have results produced. You don't need this for UPDATE and INSERT clauses.

I would recommend you to use the latest mysql plugin version and thread all the queries, then these aren't required.