note 15635 added to function.mysql-free-result
| From: | jfl at sharksforum dot com | Date: | Mon, 24 Sep 2001 11:32:56 +0000 |
| Subject: | note 15635 added to function.mysql-free-result | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18245@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 ?
--
http://www.php.net/manual/en/function.mysql-free-result.php
http://master.php.net/manage/user-notes.php?action=edit+15635
http://master.php.net/manage/user-notes.php?action=delete+15635
http://master.php.net/manage/user-notes.php?action=reject+15635