php-doc-en/reference/mysqli/functions/mysqli-store-result.xml
Dave Barr 5aa855b67e - Typo.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166223 c90b9560-bf6c-de11-be94-00142212c4b1
2004-08-13 01:00:48 +00:00

95 lines
3.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<refentry id="function.mysqli-store-result">
<refnamediv>
<refname>mysqli_store_result</refname>
<refname>mysqli->store_result</refname>
<refpurpose>Transfers a result set from the last query</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>Procedural style:</para>
<methodsynopsis>
<type>object</type><methodname>mysqli_store_result</methodname>
<methodparam><type>object</type><parameter>link</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style (method):</para>
<classsynopsis>
<ooclass><classname>mysqli</classname></ooclass>
<methodsynopsis>
<type>object</type>
<methodname>store_result</methodname>
<void />
</methodsynopsis>
</classsynopsis>
<para>
Transfers the result set from the last query on the database connection
represented by the <parameter>link</parameter> parameter to be used with
the <function>mysqli_data_seek</function> function.
</para>
<note>
<para>
Although it is always good practice to free the memory used by the result of
a query using the <function>mysqli_free_result</function> function, when
transfering large result sets using the <function>mysqli_store_result</function>
this becomes particularly important.
</para>
</note>
<note>
<para>
<function>mysqli_store_result</function> returns &false; in case the query
didn't return a result set (if the query was, for example an INSERT
statement). This function also returns &false; if the reading of the
result set failed. You can check if you have got an error by checking
if <function>mysqli_error</function> doesn't return an empty string, if
<function>mysqli_errno</function> returns a non zero value, or if
<function>mysqli_field_count</function> returns a non zero value.
Also possible reason for this function returning &false; after
successfull call to <function>mysqli_query</function> can be too large
result set (memory for it cannot be allocated). If
<function>mysqli_field_count</function> returns a non-zero value, the
statement should have produced a non-empty result set.
</para>
</note>
</refsect1>
<refsect1>
<title>Return values</title>
<para>
Returns a buffered result object or &false; if an error occurred.
</para>
</refsect1>
<refsect1>
<title>See also</title>
<para>
<function>mysqli_real_query</function>,
<function>mysqli_use_result</function>.
</para>
</refsect1>
<refsect1>
<title>Example</title>
<para>
See <function>mysqli_multi_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
-->