php-doc-en/reference/mysqli/functions/mysqli-store-result.xml
Mehdi Achour 5b71e6af80 ref.mysqli: switch to new style
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@228275 c90b9560-bf6c-de11-be94-00142212c4b1
2007-01-28 04:25:58 +00:00

115 lines
3.4 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.12 $ -->
<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 role="description">
&reftitle.description;
<para>Procedural style:</para>
<methodsynopsis>
<type>mysqli_result</type><methodname>mysqli_store_result</methodname>
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style (method):</para>
<classsynopsis>
<ooclass><classname>mysqli</classname></ooclass>
<methodsynopsis>
<type>mysqli_result</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>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&mysqli.link.description;
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a buffered result object or &false; if an error occurred.
</para>
<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 role="notes">
&reftitle.notes;
<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>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
See <function>mysqli_multi_query</function>.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>mysqli_real_query</function></member>
<member><function>mysqli_use_result</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
-->