Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use result in php

Shulou Source: shulou.com Published: 2022-06-02 03:27:39 09月29日 Update

This article mainly introduces the relevant knowledge of how to use result in php, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to use result in php. Let's take a look at it.

In php, result means "result", and the "mysql_result ()" function returns the value of a field in the result set. If it succeeds, the function returns the field value, and if it fails, it returns false with the syntax of "mysql_result (data,row,field)".

Operating environment of this tutorial: windows10 system, PHP7.1 version, DELL G3 computer

What does result mean in php

The mysql_result () function returns the value of a field in the result set.

If successful, the function returns the field value. If it fails, false is returned.

Grammar

Mysql_result (data,row,field)

Parameter description

Data is required. Specifies the result identifier to be used. This identifier is returned by the mysql_query () function.

Row is required. The required line number. The line number starts at 0.

Field is optional. Specifies which field to get. It can be a field offset value, a field name, or table.fieldname.

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

Description

When used for a large result set, you should consider using a function that can get the entire row. These functions return the contents of multiple units in a single function call, much faster than mysql_result ().

Also note that it is much faster to specify a numeric offset in a field parameter than to specify a field name or tablename.fieldname.

Examples

The output is similar to Adams

This is the end of the article on "how to use result in php". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use result in php". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Fields functions results content parameters knowledge success meaning identification identifier article grammar line number offset large primary function middle finger value example unit Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei OPPO Reno Redmi Apple Shulou Technology