Mysql_result () function of PHP

Source: Internet
Author: User
Mysql_result () function of PHP
Mysql_result () function of PHP

Definition and usageThe value of a field in the returned result set returned by the mysql_result () function. If successful, the function returns the field value. If it fails, false is returned.

SyntaxMysql_result (data, row, field)

Parameter descriptionData is required. Specifies the result identifier to be used. This identifier is returned by the mysql_query () function. Row is required. Specifies the row number. The row number starts from 0. Field is optional. Specifies which field to obtain. It can be a field offset value, field name or table. fieldname.

If this parameter is not specified, the function obtains the first field from the specified row.

DescriptionFor a large result set, you should consider using a function that can obtain the entire row. These functions return the content of multiple units in the callback function call, which is much faster than mysql_result. In addition, it is much faster to specify the offset in the field parameter than to specify the field name or tablename. fieldname.

Example

     

Output: Adams

Related Article

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.