SA-MP Forums Archive
mysql_free_result WHEN? - 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: mysql_free_result WHEN? (/showthread.php?tid=454892)



mysql_free_result WHEN? - saamp - 30.07.2013

When to use mysql_free_result? I have to use it and if I make only a query?

Код:
mysql_query("SELECT * FROM `database`);
new rows = mysql_num_rows();

mysql_free_result();



Re: mysql_free_result WHEN? - Scottas - 30.07.2013

use it after you store result.


Re: mysql_free_result WHEN? - Macluawn - 30.07.2013

Scottas, Wrong.
Use it after you no longer need the data you've stored.


Re: mysql_free_result WHEN? - MP2 - 30.07.2013

Use caching.


Re: mysql_free_result WHEN? - [HiC]TheKiller - 31.07.2013

You really shouldn't be retrieving a whole table in the first place. What are you actually trying to do?


Re: mysql_free_result WHEN? - Djole1337 - 31.07.2013

SELECT count(*) from `table`

I'd rather use that.