Re: [nyphp-talk] freeing sql results

2006-12-08 Thread Rolan Yang
Try $query = mysql_query("SELECT count(*) FROM activeAI WHERE locationID='$locationID' AND activeID <> '$activeID' AND isUndead=0"); list($numOtherAI)=mysql_fetch_row($query); mysql_free_result($query); It should conserve memory since MySql will be returning a single integer instead of the en

Re: [nyphp-talk] freeing sql results

2006-12-07 Thread jface
I did include "or die()"s, just neglected to put them into the email. No SQL syntax errors come back. The only kinds of errors I'm getting are that sql results are not being freed. Tried passing the SQL into mysql_query as a separate string, too. No luck. On Thu, 07 Dec 2006 22:34:04 -0500, Ken

Re: [nyphp-talk] freeing sql results

2006-12-07 Thread Ken Robinson
At 10:58 PM 12/7/2006, [EMAIL PROTECTED] wrote: After a lot of trial and error I've narrowed down the offending query in my problem with sql results not freeing themselves up: $query = mysql_query("SELECT activeID FROM activeAI WHERE locationID='$locationID' AND activeID <> '$activeID' AND isU

Re: [nyphp-talk] freeing sql results

2006-12-07 Thread jface
After a lot of trial and error I've narrowed down the offending query in my problem with sql results not freeing themselves up: $query = mysql_query("SELECT activeID FROM activeAI WHERE locationID='$locationID' AND activeID <> '$activeID' AND isUndead=0"); $numOtherAI = mysql_num_rows($query); m

Re: [nyphp-talk] freeing sql results

2006-12-05 Thread Jon Baer
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, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: I have a very co