Data Types Functions
The MySQL C API underlies all the APIs used by other languages to communicate with MySQL.
The MySQL C API uses several defined data types beyond the standard C types. These types are defined in the mysql.h header file that must be included when compiling any program that uses the MySQL library.
FIELD_TYPE_TINY (TINYINT)
FIELD_TYPE_SHORT (SMALLINT)
FIELD_TYPE_LONG (INTEGER)
FIELD_TYPE_INT24 (MEDIUMINT)
FIELD_TYPE_LONGLONG (BIGINT)
FIELD_TYPE_DECIMAL (DECIMAL or NUMERIC)
FIELD_TYPE_FLOAT (FLOAT)
FIELD_TYPE_DOUBLE (DOUBLE or REAL)
FIELD_TYPE_TIMESTAMP (TIMESTAMP)
FIELD_TYPE_DATE (DATE)
FIELD_TYPE_TIME (TIME)
FIELD_TYPE_DATETIME (DATETIME)
FIELD_TYPE_YEAR (YEAR)
FIELD_TYPE_STRING (CHAR or VARCHAR)
FIELD_TYPE_BLOB (BLOB or TEXT)
FIELD_TYPE_SET (SET)
FIELD_TYPE_ENUM (ENUM)
FIELD_TYPE_NULL (NULL)
FIELD_TYPE_CHAR (TINYINT) (Deprecated, replaced by FIELD_TYPE_TINY)
The following macros are provided to help examine the MYSQL_FIELD data:
Copyright © 2003 O'Reilly & Associates. All rights reserved.