Mysql_fetch_object---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Get the result of the object after the query
Syntax: Object mysql_fetch_object (int result [, int Result_typ])
Description:
Returns an object that is equivalent to getting a column, and returns fales if no more columns are returned.
Mysql_fetch_object () is similar to mysql_fetch_array (), one of the differences is that the function returns an object instead of an array, which means that you can access the data with a field name and not at their offset (offset) ( Number is illegal property name)
Non-required option result_type is a constant and can be a value of: Mysql_assoc, Mysql_num, Mysql_both.
This function is the same as mysql_fetch_array () and is similar in speed to Mysql_fetch_row ().
Example:
<?php
Mysql_connect ($host, $user, $password);
$result = mysql_db_query ("Database", "SELECT * from table");
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.