RE: local resource variables

From: Date: Thu, 26 Sep 2002 14:40:41 +0000
Subject: RE: local resource variables
Groups: php.general 
Request: Send a blank email to php-general+get-117730@lists.php.net to get a copy of this message
to test this try returning $result from the function e.g. function test() { $result = mysql_query("SELECT * FROM bigbigtable"); return $result; } echo(mysql_numrows(test())) remember $result holds a number that is a pointer to the result set resource, it isn't the actual result data set, if the memory hasn't been freed you should still be able to get to it ... I think Tim www.chessish.com > -----Original Message----- > From: lallous [mailto:phplist@lgwm.org] > Sent: 26 September 2002 11:20 > To: php-general@lists.php.net > Subject: local resource variables > > > Hello, > > > I was wondering if i do: > > function test() > { > $result = mysql_query("SELECT * FROM bigbigtable"); > } > > after calling test() will $result be freed as if calling > mysql_free_result()? > > > Elias > > >

« previous php.general (#117730) next »