Jump to content

Archived

This topic is now archived and is closed to further replies.

cjkent17

help with mysql_free_result(int result);

Recommended Posts

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)?

Share this post


Link to post
Share on other sites
phpfreaks.com Example

Submitted 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?

Share this post


Link to post
Share on other sites

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 :D

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.