Re: Why does this script run out of memory?
| From: | Jim Long | Date: | Fri, 28 Oct 2011 19:37:25 +0000 |
| Subject: | Re: Why does this script run out of memory? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315514@lists.php.net to get a copy of this message | ||
On Fri, Oct 28, 2011 at 03:24:37PM -0400, Jim Giner wrote:
> If all you want to do is count the records, why are you not letting sql do
> it for you instead of doing the while loop? That's all that script is
> doing, if that is the exact code you ran.
Hi, Jim.
Thank you for replying.
One of the key concepts of troubleshooting is that when you
encounter a problem, you try to state the problem with as simple
a test case as possible, so that testing will not be complicated
by extraneous variables or code that may or may not have any
impact on the problem.
I don't want to just count the records, I want to get some work
done for a client. That work involves processing every record in
the result set. "Counting" is just a simple process to conduct
for the purpose of debugging this loop algorithm.
The problem is that this algorithm fails to process all the
records in the result set.
I appreciate any insights you have as to why that is happening.
Jim