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 |