Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use mysqldecimal

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report