Oracle 5.0 Reference Manual page 2297

Table of Contents

Advertisement

Description
bool mysql_free_result(
resource result);
mysql_free_result
mysql_free_result
used for queries that return large result sets. All associated result memory is automatically freed at the
end of the script's execution.
Parameters
result
Return Values
Returns
TRUE
If a non-resource is used for the result, an error of level E_WARNING will be emitted. It's worth
noting that
mysql_query
queries.
Examples
Example 20.53. A
<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
/* Use the result, assuming we're done with it afterwards */
$row = mysql_fetch_assoc($result);
/* Now we free up the result and continue on with our script */
mysql_free_result($result);
echo $row['id'];
echo $row['email'];
?>
Notes
See Also
mysql_query
is_resource
20.7.2.5.26.
mysql_get_client_info
Copyright 1997-2012 the PHP Documentation Group. [2230]
Original MySQL API (Mysql)
Assign the value of
PDOStatement::closeCursor
will free all memory associated with the result identifier result.
only needs to be called if you are concerned about how much memory is being
The result resource that is being evaluated. This result comes from
a call to mysql_query.
on success or
on failure.
FALSE
only returns a resource for SELECT, SHOW, EXPLAIN, and DESCRIBE
mysql_free_result
Note
For backward compatibility, the following deprecated alias may be used:
mysql_freeresult
to the PDO object, or
NULL
example
2277

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents