note 15635 deleted from function.mysql-free-result by philip
| From: | philip@php.net | Date: | Thu, 29 Nov 2001 08:54:15 +0000 |
| Subject: | note 15635 deleted from function.mysql-free-result by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-21418@lists.php.net to get a copy of this message | ||
function get_tablerow ($fields, $table, $where_clause) {
$SQL = "SELECT ".$fields." FROM ".$table." WHERE
".$where_clause." LIMIT 1";
if ($RS = mysql_db_query(db_name, $SQL, db_conn)) {
$RSarray = mysql_fetch_array($RS);
//mysql_free_result($RS);
return $RSarray;
}
return false;
}
In the above function I have disabled mysql_free_result($RS) because if I run the same query later
in the same process (which I sometimes do), mysql will not need to do the query again but can just
fetch it from the cache. Am I right ?