一般都是用mysql_fetch_array或mssql_fetch_array返回的结果集…那么不一般呢?

解决方案 »

  1.   

    array mysql_fetch_array ( resource result [, int result_type])mysql_fetch_array() 中可选的第二个参数 result_type 是一个常量,可以接受以下值:MYSQL_ASSOC,MYSQL_NUM 和 MYSQL_BOTH。本特性是 PHP 3.0.7 起新加的。本参数的默认值是 MYSQL_BOTH。 如果用了 MYSQL_BOTH,将得到一个同时包含关联和数字索引的数组。用 MYSQL_ASSOC 只得到关联索引(如同 mysql_fetch_assoc() 那样),用 MYSQL_NUM 只得到数字索引(如同 mysql_fetch_row() 那样)。 注: 该函数返回的字段名是大小写敏感的。
      

  2.   

    mssql_fetch_array --  Fetch a result row as an associative array, a numeric array, or both 
    array mssql_fetch_array ( resource result [, int result_type])
    Returns: An array that corresponds to the fetched row, or FALSE if there are no more rows. mssql_fetch_array() is an extended version of mssql_fetch_row(). In addition to storing the data in the numeric indices of the result array, it also stores the data in associative indices, using the field names as keys. An important thing to note is that using mssql_fetch_array() is NOT significantly slower than using mssql_fetch_row(), while it provides a significant added value.