Daevid,

Thanks for the links so I can read up!

-ML

----- Original Message -----
From: "Daevid Vincent" <dae...@daevid.com>
To: php-general@lists.php.net
Cc: "Slack-Moehrle" <mailingli...@mailnewsrss.com>
Sent: Wednesday, January 20, 2010 1:24:16 PM
Subject: RE: [PHP] Close MySQL Result

http://www.php.net/manual/en/function.mysql-free-result.php

mysql_free_result($myresult); 

NOTE: mysql_free_result() only needs to be called if you are concerned
about how much memory is being used for queries that return large result
sets. All associated result memory is automatically freed at the end of the
script's execution. 

http://us2.php.net/manual/en/function.unset.php

unset($Row);

> -----Original Message-----
> From: Slack-Moehrle [mailto:mailingli...@mailnewsrss.com] 
> Sent: Wednesday, January 20, 2010 1:21 PM
> To: php-general@lists.php.net
> Subject: [PHP] Close MySQL Result
> 
> I think I am a dork.
> 
> How do I close a MySQL result set to free memory?
> 
> Given something like this:
> 
> $gsql = "Select * from resources where queryName = 'Production';";
> 
> $myresult = mysql_query($gsql) or die('Cannot execute Query: 
> ' . mysql_error());
> 
> $Row = mysql_fetch_assoc($myresult);
>       
> if ($Row == true) { $_SESSION['PRODUCTION'] = $Row['queryValue']; }
> else { $_SESSION['PRODUCTION'] = "TRUE"; }
> 
> How do I free up $myresult and $Row?
> 
> -ML
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to