1mysql_stmt_fetch(3) MariaDB Connector/C mysql_stmt_fetch(3)
2
3
4
5 Name
6 mysql_stmt_fetch - Fetches result set row from a prepared statement
7
8 Synopsis
9 #include <mysql.h>
10
11 int mysql_stmt_fetch(MYSQL_STMT * stmt);
12
13 Description
14 Fetch the result from a prepared statement into the buffer bound by
15 [mysql_stmt_bind_result()}(mysql_stmt_bind_result).
16
17 Parameter
18 • stmt - a statement handle, which was previously allocated by
19 mysql_stmt_init(3).
20
21 Return value
22 Returns 0 for success, MYSQL_NO_DATA if the end of the result set has
23 been reached, or MYSQL_DATA_TRUNCATION if one or more values are trun‐
24 cated.
25
26 Notes
27 • Note that all columns must be bound by the application before calling
28 mysql_stmt_fetch().
29
30 • Data are transferred unbuffered without calling mysql_stmt_store_re‐
31 sult(3) which can decrease performance (but reduces memory cost).
32
33 • Truncation reporting must be enabled by function mysql_optionsv(3)
34 with option MYSQL_REPORT_DATA_TRUNCATION
35
36 See Also
37 • mysql_stmt_prepare(3)
38
39 • mysql_stmt_bind_result(3)
40
41 • mysql_stmt_execute(3)
42
43
44
45Version 3.2.2 mysql_stmt_fetch(3)