From 5beaca7d29fbe7e2ab54a169217fbd3221949946 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Thu, 15 Jul 2004 21:28:57 +0000 Subject: [PATCH] Added an example, implemented user notes on how E_WARNING is emitted if !resource, and added see also. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@163409 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../mysql/functions/mysql-free-result.xml | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/reference/mysql/functions/mysql-free-result.xml b/reference/mysql/functions/mysql-free-result.xml index c4077f1c5f..2d93758ab1 100644 --- a/reference/mysql/functions/mysql-free-result.xml +++ b/reference/mysql/functions/mysql-free-result.xml @@ -1,5 +1,5 @@ - + @@ -21,15 +21,49 @@ you are concerned about how much memory is being used for queries that return large result sets. All associated result memory is automatically freed at the end of the script's execution. - &return.success; + + 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 only returns a resource + for SELECT, SHOW, EXPLAIN, and DESCRIBE queries. + + + + A <function>mysql_free_result</function> example + + +]]> + + + For downward compatibility mysql_freeresult can also be used. This is deprecated, however. + + See also mysql_query and + is_resource. +