mysql_free_result()

This is a discussion on mysql_free_result() within the PHP Language forums, part of the PHP Programming Forums category; After the webserver executed a page.php (resulting with or without error), are all $result from mysql_query() released automatically? -- iTech ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-27-2007
Man-wai Chang
 
Posts: n/a
Default mysql_free_result()


After the webserver executed a page.php (resulting with or without
error), are all $result from mysql_query() released automatically?

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Reply With Quote
  #2 (permalink)  
Old 04-27-2007
Schraalhans Keukenmeester
 
Posts: n/a
Default Re: mysql_free_result()

Man-wai Chang wrote:
>
> After the webserver executed a page.php (resulting with or without
> error), are all $result from mysql_query() released automatically?
>

Google
Reply With Quote
  #3 (permalink)  
Old 04-27-2007
Man-wai Chang
 
Posts: n/a
Default Re: mysql_free_result()

> Yes, when the script finishes executing. There is a memory leak somewhere
> though in mysql_query() and using mysql_free_result() doesn't properly free
> all the memory. Unless you are executing thousands of queries in a single
> script this shouldn't be a problem. If it is, you can just increase the
> available memory size for your script.


Memory leak? What about local variables?

This function reminds me of the RELEASE command in Foxpro. But then, I
never seen a need to use it as long as I declare the variables as LOCAL
or PRIVATE.

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Reply With Quote
  #4 (permalink)  
Old 04-27-2007
Man-wai Chang
 
Posts: n/a
Default Re: mysql_free_result()

> Google

So did you publish your findings and experiences on PHP? If no one
expert talked, what kind of answers could Google found?

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Reply With Quote
  #5 (permalink)  
Old 04-27-2007
Man-wai Chang
 
Posts: n/a
Default Re: mysql_free_result()

Man-wai Chang wrote:
>> Google

>
> So did you publish your findings and experiences on PHP? If no one
> expert talked, what kind of answers could Google found?
>


And you didn't think Google could read your mind, could you?

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Reply With Quote
  #6 (permalink)  
Old 04-27-2007
Schraalhans Keukenmeester
 
Posts: n/a
Default Re: mysql_free_result()

Man-wai Chang wrote:
>> Google

>
> So did you publish your findings and experiences on PHP? If no one
> expert talked, what kind of answers could Google found?
>

So did you even try and find an answer there yourself? Suppose not.
Sh.
Reply With Quote
  #7 (permalink)  
Old 04-27-2007
-Lost
 
Posts: n/a
Default Re: mysql_free_result()

David Gillen wrote:
> Man-wai Chang said:
>> After the webserver executed a page.php (resulting with or without
>> error), are all $result from mysql_query() released automatically?
>>

> Yes, when the script finishes executing. There is a memory leak somewhere
> though in mysql_query() and using mysql_free_result() doesn't properly free
> all the memory. Unless you are executing thousands of queries in a single
> script this shouldn't be a problem. If it is, you can just increase the
> available memory size for your script.


Is that Bug #28424? I often wondered if he meant result or query.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:26 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0