C API Datatypes
Here is a list of C API data types from the mysql.h header file:
MYSQLA database handle structure created by
mysql_init()and released withmysql_close().MYSQL_RESA structure for a results set from an SQL query. This structure is used by fetch functions and is released with
mysql_free_result().MYSQL_ROWA structure for holding a row of data from a results set. The data is retrieved from this structure by the
mysql_fetch_row()function.MYSQL_FIELDA structure for holding an array of information about a field of a results set. The array may be set with the
mysql_fetch_field()function. The elements includename,table, anddeffor the default value.MYSQL_FIELD_OFFSETUsed for recording a pointer location for a results set. The offset value can be retrieved by the
mysql_row_tell()function and deployed withmysql_row_seek().my_ulonglongA variable type for storing the number of rows for functions such as
mysql_affected_rows(),mysql_num_rows(), andmysql_insert_id(). To print the value of a variable using this type, copy the value to another variable that uses the unsigned long type.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access