How to use mysqldecimal
This article is to share with you about how to use mysqldecimal. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Mysql_fetch_field () is a function that returns an array of objects that represent fields (columns) in the result set, returns an array of objects that represent fields (columns) in the result set, and then outputs each field name, table, and maximum length.
Mysqldecimal header file
# include
Function prototype editing
MYSQL_FIELD*mysql_fetch_fields (MYSQL_RES*result)
Description editing
For the result set, returns an array of all MYSQL_FIELD structures. Each structure provides a field definition for 1 column in the result set. An array of MYSQL_FIELD structures for all columns of the result set.
Return value editing
Returns the object that contains the field definition information. Returns FALSE if no information is available. The object has the following properties:
Name- column name
The original column name of orgname- (if an alias is specified)
Table- table name
The original table name of orgtable- (if an alias is specified)
Maximum width of the max_length- field
The field width specified by length- in the table definition
Character set number of the charsetnr- field
The bit flag of the flags- field
The data type used by type- for the field
Decimals- integer field, the number of digits after the decimal point
Mysqldecimal example
Unsignedintnum_fields
Unsignedinti
MYSQL_FIELD*fields
Num_fields=mysql_num_fields (result)
Fields=mysql_fetch_fields (result)
For (iSuppli)