NYCPHP Meetup

NYPHP.org

[nycphp-talk] freeing sql results

Jon Baer jonbaer at jonbaer.com
Tue Dec 5 22:45:34 EST 2006


Add a debug_print_backtrace() before the free result or query.  I  
find it to be very handy in PHP5, although I wish there was a way to  
dump the results to a UDP port for catching it as well.

- Jon

On Dec 5, 2006, at 8:39 PM, <jface at mercenarylabs.com>  
<jface at mercenarylabs.com> wrote:

> I have a very complex app I've been working on currently at about  
> three thousand lines of code. All of a sudden it started spitting  
> out the following warning:
>
> Warning: Unknown: 2 result set(s) not freed. Use mysql_free_result  
> to free result sets which were requested using mysql_query() in  
> Unknown on line 0
>
> So I went through it line-by-line and added a mysql_free_result()  
> after EVERY query, to no avail.
>
> The worst thing about this error is that it doesn't give me a valid  
> line number, so it's impossible to tell exactly where the bad  
> queries are.
>
> This is occurring on a php5/mysql5/apache setup.
>
> Anyone have any suggestions? I'm out of ideas.
>
> Jonathan
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php




More information about the talk mailing list