[PHP] use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-18 Thread Support @ Fourthrealm.com

Rick, or anyone,

Based on what you said below, can you describe for me when the 
mysql_free_result tag should be used, and when it is not necessary?

I'm fluent in other web languages (iHTML, ASP), but am fairly new to PHP, 
so I'm still learning the intricacies of the language, and the best way to 
use it

Many thanks,
Peter



At 04:02 PM 9/18/2002 -0600, you wrote:
If you aren't doing anything else in a script, mysql_free_result is not needed
in a script like this because the result set will be cleaned up by PHP when
the script ends.

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-18 Thread Chris Shiflett

This frees the memory that is used to store the results of your query 
(the $result variable in most examples).

Many people leave this out, because PHP does a lot of cleanup for you 
when your script exits. However, it is a good habit to go ahead and free 
your results once you are finished using them. It is never really 
necessary, but imagine if you have an enormous result set that takes a 
great deal of memory, you have many people hitting your site, and you 
have a great deal of logic remaining before your script executes. The 
amount of wasted memory can be significant in some cases, so you can use 
this function to keep the damage low.

Happy hacking.

Chris

Support  Fourthrealm.com wrote:

 Based on what you said below, can you describe for me when the 
 mysql_free_result tag should be used, and when it is not necessary? 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php