mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added documentation for mysql_unbuffered_query().
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@47190 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
4eec78c276
commit
5aa984380c
1 changed files with 44 additions and 0 deletions
|
@ -1756,6 +1756,50 @@ $result = mysql_query ("SELECT my_col FROM my_tbl")
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.mysql-unbuffered-query">
|
||||
<refnamediv>
|
||||
<refname>mysql_unbuffered_query</refname>
|
||||
<refpurpose>Send an SQL query to MySQL, without fetching and buffering the result rows</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>mysql_unbuffered_query</function></funcdef>
|
||||
<paramdef>string <parameter>query</parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>link_identifier</optional></parameter>
|
||||
</paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>result_mode</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>mysql_unbuffered_query</function> sends a SQL query to MySQL,
|
||||
without fetching and buffering the result rows automatically, as
|
||||
<function>mysql_query</function> does.
|
||||
On the one hand, this saves a considerable amount of memory with SQL
|
||||
queries that produce large result sets. On the other hand, you can start
|
||||
working on the result set immediately after the first row has been
|
||||
retrieved: you don't have to wait until the complete SQL query has been
|
||||
performed.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The benefits of <function>mysql_unbuffered_query</function> come at a
|
||||
cost: You cannot use <function>mysql_num_rows</function> on a result set
|
||||
returned from <function>mysql_unbuffered_query</function>. You also have
|
||||
to fetch all result rows from an unbuffered SQL query, before you can
|
||||
send a new SQL query to MySQL.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also: <function>mysql_query</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.mysql-result">
|
||||
<refnamediv>
|
||||
<refname>mysql_result</refname>
|
||||
|
|
Loading…
Reference in a new issue