473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
Apr 27 '07 #1
6 1921
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
Apr 27 '07 #2
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
Apr 27 '07 #3
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
Apr 27 '07 #4
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
Apr 27 '07 #5
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.
Apr 27 '07 #6
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.
Apr 27 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence k | last post by:
I've this class method, which makes sure I've got a variable that is a resource: function close() { if (is_resource($this->datastoreResultsPointer)) {...
0
by: monomaniac21 | last post by:
hi im trying to do a query which takes rows of large amounts of text data and displays them one after another. the size of the fields is causing the page to be massive in size. so to try and...
0
by: Gawn | last post by:
Dear all, Greeding from Thailand. Need help for my news script. I am trying to display news which keywords match the current page keywords. I am using Dreamweaver 8 and PhpMyAdmin to manage MySQL....
19
by: Mitesh | last post by:
Hi all, I have the following code: $req = "SELECT * FROM table1"; $res = mysql_query($req); if(!$res) return;
17
by: chaos | last post by:
HELLO !!! i doing timetable system using php. i now stuck in part whereby showing the change between Original TimeTable and Proposed TimeTable in chart so that the user will know the change he...
3
by: Hazza | last post by:
Hi, I am using PHP and mysql to create a website. I am fairly new to PHP, and thus am grateful to anyone who helps! Firstly I am running a homepage, that displays additional content if a user...
2
gregerly
by: gregerly | last post by:
Hello All, It's been a while since I posted, I went on vacation and have been swamped with projects. I am experiencing an issue that I wanted to run by the experts. I am writing a script that...
32
by: maximillion511 | last post by:
Hello to all and thanks for your help in advance. I am having been fighting with this problem for a couple of days now and after much unsuccessful research, I am still looking for an answer. So...
15
by: Lawrence Krubner | last post by:
Does anything about this script look expensive, in terms of resources or execution time? This script dies after processing about 20 or 25 numbers, yet it leaves no errors in the error logs. This is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.