PHPmysql_field_flags () instance tutorial _ PHP Tutorial

Source: Internet
Author: User
PHPmysql_field_flags () instance tutorial. Define and use the records returned by the mysql_field_flags () function. This function gets the foreign data mysql_query () function, and returns a string of success, or definition and usage.
Records of the flag field returned by the mysql_field_flags () function.

This function gets the foreign data mysql_query () function, and returns a string of success, or FALSE or failure, there are no more rows.

Possible return values:

Auto_intcrement-1, if you set A UTO_INCREMENT
Binary-1. if the Binar attribute set exists in the field
Spot-1, if it is a B LOB outside the country
Enumeration-1. if the field is an enumeration field
Multiple_key-1, if the field is a non-unique key
Not_null-1, if the field cannot be blank
Primary_key-1, if it is the first key in the field
Timestamp-1. if the field is a timestamp field
Unique_key-1, if the field is a unique key
Unsigned-1. if it is an unsigned domain
Zerofill-1, if it is field zero fill
Syntax

Mysql_field_flags (data, field_offset)


Data :. The specified data pointer is used. The data pointer is required from the field_offset function of mysql_query. Specify which fields to return. 0 indicates the first column to view the instance.

$ SQL = "SELECT * from Person ";
$ Result = mysql_query ($ SQL, $ con );

$ Flags = mysql_field_flags ($ result, 0 );


Echo $ flags;

Output result.

Not_null primary_key auto_increment

Records records of the flag field returned by the mysql_field_flags () function. This function gets the foreign data mysql_query () function, and returns a string success, or...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.