php-doc-en/reference/mysql/functions/mysql-unbuffered-query.xml
Hartmut Holzgraefe 5b9fc29465 revision tags added
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-17 06:45:35 +00:00

75 lines
2.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -->
<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>
<methodsynopsis>
<type>resource</type><methodname>mysql_unbuffered_query</methodname>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>result_mode</parameter></methodparam>
</methodsynopsis>
<para>
<function>mysql_unbuffered_query</function> sends a SQL query
<parameter>query</parameter> 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. When using multiple DB-connects, you
have to specify the optional parameter
<parameter>link_identifier</parameter>.
</para>
<para>
The optional <parameter>result_mode</parameter> parameter
can be MYSQL_USE_RESULT and MYSQL_STORE_RESULT. It
defaults to MYSQL_USE_RESULT, so the result is not buffered.
See also <function>mysql_query</function> for the
counterpart of this behaviour.
</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>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->