1mysql_field_count(3) MariaDB Connector/C mysql_field_count(3)
2
3
4
5 Name
6 mysql_field_count - returns the number of columns for the most recent
7 statement
8
9 Synopsis
10 #include <mysql.h>
11
12 unsigned int mysql_field_count(MYSQL * mysql);
13
14 Description
15 Returns the number of columns for the most recent statement on the con‐
16 nection represented by the link parameter as an unsigned integer. This
17 function can be useful when using the mysql_store_result(3) function to
18 determine if the query should have produced a non-empty result set or
19 not without knowing the nature of the query.
20
21 Parameters
22 • mysql is a connection identifier, which was previously allocated by
23 mysql_init(3) and connected by mysql_real_connect(3).
24
25 Notes
26 The mysql_field_count() function should be used to determine if there
27 is a result set available.
28
29 Return value:
30 The number of columns for the most recent statemet. The value is zero,
31 if the statemet didn’t produce a result set.
32
33 See also
34 • mysql_store_result(3)
35
36 • mysql_use_result(3)
37
38
39
40Version 3.3.1 mysql_field_count(3)