fetchAll()与mysql_fetch_array()的区别详解

网络编程 2021-07-05 09:49www.168986.cn编程入门
本篇文章是对fetchAll()与mysql_fetch_array()的区别进行了详细的分析介绍,需要的朋友参考下
同一个查询语句
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" 
}

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by