Re: Freeing results in DB class after returning value

From: Date: Sat, 02 Mar 2002 11:52:38 +0000
Subject: Re: Freeing results in DB class after returning value
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-927@lists.php.net to get a copy of this message
but in this case it would never work, cause the $db->free() statement will never reached. regards thomas "Ron Dyck" <adam@webbtech.net> schrieb im Newsbeitrag news:004701c1c155$be189eb0$8402a8c0@co279512a... Can I free the result of a query after I do a 'return' in a function. See below for example. function getFileName($field, $id, $type) { global $db; $Query = "SELECT Name FROM image "; $Query .= "WHERE ID = '$id' "; $Query .= "AND Field = '$field' "; $Query .= "AND Type = '$type' "; return $db->getOne($Query); $db->free(); // Not entirely sure this'll work } ======================= Ron Dyck WebbTech www.webbtech.net rhd@webbtech.net

« previous php.pear.general (#927) next »