Mysql_fetch_array---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Get the array results after the query
Syntax: array mysql_fetch_array (int result [, int result_type])
Description:
Returns an array that is equivalent to getting a column, and returns False if no more columns are returned.
Mysql_fetch_array () is an extended version of Mysql_fetch_row () that, in addition to storing data in the numeric index of an array, can store data in a grouped index, using a field name as an index value.
If the result of the query is that more than two fields are the same name, the last field is valid, and in order to access the field of the same name, you must give the field an individual name.
Select T1.f1 as Foo t2.f1 as bar from T1, T2
The second parameter of the mysql_fetch_array () Result_type is required, Result_type is constant and has the following values: Mysql_assoc,mysql_num and Mysql_both ( This is new in PHP3.0.7)
For more information please refer 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.