2003-03-15 23:01:35 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2004-08-13 01:00:48 +00:00
|
|
|
<!-- $Revision: 1.8 $ -->
|
2003-03-15 23:01:35 +00:00
|
|
|
<refentry id="function.mysqli-store-result">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>mysqli_store_result</refname>
|
2004-01-28 23:18:42 +00:00
|
|
|
<refname>mysqli->store_result</refname>
|
2003-05-15 09:59:23 +00:00
|
|
|
<refpurpose>Transfers a result set from the last query</refpurpose>
|
2003-03-15 23:01:35 +00:00
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
2004-01-28 23:18:42 +00:00
|
|
|
<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>
|
2003-03-15 23:01:35 +00:00
|
|
|
<methodsynopsis>
|
2004-01-28 23:18:42 +00:00
|
|
|
<type>object</type>
|
|
|
|
<methodname>store_result</methodname>
|
2004-05-12 17:02:31 +00:00
|
|
|
<void />
|
2003-03-15 23:01:35 +00:00
|
|
|
</methodsynopsis>
|
2004-01-28 23:18:42 +00:00
|
|
|
</classsynopsis>
|
2003-03-15 23:01:35 +00:00
|
|
|
<para>
|
2003-05-25 19:09:28 +00:00
|
|
|
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.
|
2003-03-15 23:01:35 +00:00
|
|
|
</para>
|
2003-05-15 09:59:23 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
2003-05-25 19:09:28 +00:00
|
|
|
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
|
2004-01-28 23:18:42 +00:00
|
|
|
transfering large result sets using the <function>mysqli_store_result</function>
|
2003-05-25 19:09:28 +00:00
|
|
|
this becomes particularly important.
|
2003-05-15 09:59:23 +00:00
|
|
|
</para>
|
|
|
|
</note>
|
2004-01-28 23:18:42 +00:00
|
|
|
<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>
|
2004-08-13 01:00:48 +00:00
|
|
|
Returns a buffered result object or &false; if an error occurred.
|
2004-01-28 23:18:42 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
|
|
<title>See also</title>
|
|
|
|
<para>
|
|
|
|
<function>mysqli_real_query</function>,
|
|
|
|
<function>mysqli_use_result</function>.
|
|
|
|
</para>
|
2003-03-15 23:01:35 +00:00
|
|
|
</refsect1>
|
2004-02-27 09:22:17 +00:00
|
|
|
<refsect1>
|
|
|
|
<title>Example</title>
|
|
|
|
<para>
|
|
|
|
See <function>mysqli_multi_query</function>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2003-03-15 23:01:35 +00:00
|
|
|
</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
|
|
|
|
-->
|