cjkent17 Posted October 29, 2003 Share Posted October 29, 2003 I was wondering if the mysql_free_result(int result); function can be used with a wildcard (ie, so it free\'s all results without you having to type each of the names in)? Link to comment https://forums.phpfreaks.com/topic/1242-help-with-mysql_free_resultint-result/ Share on other sites More sharing options...
pauper_i Posted October 29, 2003 Share Posted October 29, 2003 phpfreaks.com ExampleSubmitted by phpfreak - May 21, 2002 $sql = mysql_query(\"SELECT item1, item2 FROM yourtable order by item1\") or die (mysql_error()); while(list($item1, $item2)=mysql_fetch_array($sql)){ echo \"$item1 and $item2\"; } mysql_free_result($sql); http://www.phpfreaks.com/phpref/2.php How many concurrent queries are you running? Link to comment https://forums.phpfreaks.com/topic/1242-help-with-mysql_free_resultint-result/#findComment-4145 Share on other sites More sharing options...
cjkent17 Posted October 29, 2003 Author Share Posted October 29, 2003 i know how to use it, i just made a whole site without realizing i needed to release all the results, which means i gotta go through every single page, find every single query (and there is a lot of them, over 40 pages) that is stored in a variable array and free them after they have finished being useful. i basically just want to know if there is any way to go to the end of each page and just type for example (don\'t try this, it doesn\'t work) mysql_free_result(*); and that way it would free all of them at once. i just mainly want to know if i can save myself a lot of time and patience doing it an easy way rather than find out after i did it all Link to comment https://forums.phpfreaks.com/topic/1242-help-with-mysql_free_resultint-result/#findComment-4148 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.