php-doc-en/reference/mysql/functions/mysql-unbuffered-query.xml
Hannes Magnusson c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00

106 lines
3.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
<refentry xml:id="function.mysql-unbuffered-query" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysql_unbuffered_query</refname>
<refpurpose>Send an SQL query to MySQL, without fetching and buffering the result rows</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<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>
</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>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>query</parameter></term>
<listitem>
<para>
A SQL query
</para>
</listitem>
</varlistentry>
&mysql.linkid.description;
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
For SELECT, SHOW, DESCRIBE or EXPLAIN statements,
<function>mysql_unbuffered_query</function>
returns a <type>resource</type> on success, or &false; on
error.
</para>
<para>
For other type of SQL statements, UPDATE, DELETE, DROP, etc,
<function>mysql_unbuffered_query</function> returns &true; on success
or &false; on error.
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
The benefits of <function>mysql_unbuffered_query</function> come
at a cost: You cannot use <function>mysql_num_rows</function> and
<function>mysql_data_seek</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>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>mysql_query</function></member>
</simplelist>
</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
-->