mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
a) inserted mysql_free_result in example
b) changed mysql_query description: mysql_query returns a resultset for SELECT, EXPLAIN DESCRIBE and SHOW statements, not only for select statements. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@70196 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
2de8a821f3
commit
133c59662b
1 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.85 $ -->
|
||||
<!-- $Revision: 1.86 $ -->
|
||||
<reference id="ref.mysql">
|
||||
<title>MySQL Functions</title>
|
||||
<titleabbrev>MySQL</titleabbrev>
|
||||
|
@ -111,6 +111,9 @@ while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
|||
}
|
||||
print "</table>\n";
|
||||
|
||||
// Free resultset
|
||||
mysql_free_result($result);
|
||||
|
||||
// Closing connection
|
||||
mysql_close($link);
|
||||
?>
|
||||
|
@ -1793,7 +1796,8 @@ echo "$num_rows Rows\n";
|
|||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Only for SELECT statements <function>mysql_query</function>
|
||||
Only for SELECT,SHOW,EXPLAIN or DESCRIBE statements
|
||||
<function>mysql_query</function>
|
||||
returns a resource identifier or &false; if the query was
|
||||
not executed correctly. For other type of SQL statements,
|
||||
<function>mysql_query</function> returns &true; on success
|
||||
|
@ -1849,7 +1853,8 @@ $result = mysql_query("SELECT my_col FROM my_tbl")
|
|||
statement.
|
||||
</para>
|
||||
<para>
|
||||
Only for SELECT statements, <function>mysql_query</function>
|
||||
Only for SELECT,SHOW,DESCRIBE or EXPLAIN statements,
|
||||
<function>mysql_query</function>
|
||||
returns a new result identifier that you can pass to
|
||||
<function>mysql_fetch_array</function> and other
|
||||
functions dealing with result tables. When you are done with the
|
||||
|
|
Loading…
Reference in a new issue