首页  >  文章  >  后端开发  >  fetchAll()与mysql_fetch_array()的区别详解_PHP教程

fetchAll()与mysql_fetch_array()的区别详解_PHP教程

WBOY
WBOY原创
2016-07-21 15:09:041031浏览

同一个查询语句:
fetchAll():

复制代码 代码如下:

array(1) {       
   [0]=>  array(6) {             
     ["id"]=>    string(2) "15"          
                   [0]=>    string(2) "15"        
            ["lot_sellid"]=>    string(20) "00000000000000003877"    
     [1]=>    string(20) "00000000000000003877"              
      ["lotteryid"]=>    string(2) "D8"               
            [2]=>    string(2) "D8"                 
        }  
}

mysql_fetch_array():
复制代码 代码如下:

array(6) {
                      [0]=> string(2) "15"
                      ["id"]=> string(2) "15"
                      [1]=> string(20) "00000000000000003877"
                      ["lot_sellid"]=> string(20) "00000000000000003877"
                      [2]=> string(2) "D8"
                      ["lotteryid"]=> string(2) "D8" 
}

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/327334.htmlTechArticle同一个查询语句: fetchAll(): 复制代码 代码如下: array(1) { [0]= array(6) { ["id"]= string(2) "15" [0]= string(2) "15" ["lot_sellid"]= string(20) "00000000000000003...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn