1
<?xml version='1.0' encoding='UTF-8'?>
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3
"docbook/dtd/xml/4.2/docbookx.dtd" [
4
<!ENTITY % global_ents SYSTEM "../global.ent">
7
<refentry id="functions.mysql_stmt_fetch" display-name="0">
9
<refentrytitle>mysql_stmt_fetch</refentrytitle>
12
<refname>mysql_stmt_fetch</refname>
13
<refpurpose>Fetches result buffer into bound buffer</refpurpose>
15
<refsect1 role="description">
18
<methodname>mysql_stmt_fetch</methodname>
19
<methodparam><type>MYSQL_STMT *</type><parameter>stmt</parameter></methodparam>
21
<para>Fetch the result from a prepared statement into the buffer bound by <function>mysql_stmt_bind_result()</function>.</para>
23
<refsect1 role="parameters">
24
<title>Parameters</title>
26
<varlistentry><term><parameter>stmt</parameter></term><listitem><para>¶m.stmt;</para></listitem></varlistentry>
30
<refsect1 role="returnvalue">
31
<title>Return value</title>
32
<para>Returns one of the following values</para>
34
<varlistentry><term>0</term><listitem><para>Success</para></listitem></varlistentry>
35
<varlistentry><term>MYSQL_NO_DATA</term><listitem><para>End of result set reached</para></listitem></varlistentry>
36
<varlistentry><term>MYSQL_DATA_TRUNCATION</term><listitem><para>One or more values are truncated</para></listitem></varlistentry>
39
<refsect1 role="notes">
42
<para>Note that all columns must be bound by the application before calling <function>mysql_stmt_fetch()</function>.</para>
43
<para>Data are transferred unbuffered without calling <function>mysql_stmt_store_result()</function> which can decrease performance (but reduces memory cost).</para>
46
<refsect1 role="seealso">
47
<title>See also</title>
48
<para><function>mysql_stmt_prepare()</function>, <function>mysql_stmt_bind_result()</function>, <function>mysql_stmt_execute()</function></para>