Mysqli_result Class--member method

Source: Internet
Author: User
Mysqli_result Class--member method
Close () releases the inner and closes the result set, which is no longer available once the result set is called.
Data_seek () explicitly change the current result record order
Fetch_field () Get information about a field from the result set
Fetch_fields () Get information about all fields from the result set
Fetch_field_direct () Gets the details of the class from a specified column, returning an object containing column information
Fetch_array () Returns a result record in two forms of an ordinary indexed array and an associative array
FETCH_ASSOC () Returns a result record in the form of an ordinary associative array
Fetch_object () Returns a result record in the form of an object
Fetch_row () Returns a result record in the form of an ordinary indexed array
Field_seek () sets the offset position of the field in the result set
Member Self Property
$current _field Gets the field offset position pointed to in the current result, is an integer
Get the number of columns $field _count result set
$lengths returns an array that is saved in the result set to get the length of the current first column
$num _row Returns the number of rows in the result set (including) records
The object of the Mysqli_result class, by default, is returned by the SELECT statement executed by the query () method in the Mysqli object, and all the resulting data is retrieved from the MySQL server to the client and saved in the object.
If you want to leave the results on the MySQL server for the time being, and then read the records only when necessary, you need to provide a Mysql_use_result value in the second argument when you call the query () method. It is useful to use this parameter when the data collection being processed is large or not suitable to be retrieved to the client all at once. However, to find out how many records this query has found, only after all the result records have been read. Use the query () method in the Mysqli object to get the code for the result set:
$result = $mysqli->query (' SELECT * FROM table limit 10 '); Retrieving data to the client, parsing the data from the result set

The above describes the Mysqli_result class-member methods, including aspects of the content, I hope to be interested in the PHP tutorial friends helpful.

  • 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.