fetchAll 的小小分析

includes\database\prefetch.inc line 425

$this->defaultFetchStyle: fetch_object int 5

protected $defaultFetchOptions = array(
'class' => 'stdClass',
'constructor_args' => array(),
'object' => NULL,
'column' => 0,
);

while (isset($this->currentRow)) {
// Grab the row in the format specified above.
$result[] = $this->current();
$this->next();
}


说明一个什么问题呢, 就是fetchAll 应该就是生成以0为开始的数组的, 数组key自增,从0开始, 数组值是对象。
 
posted @ 2020-05-29 17:11  qqisnow2021  阅读(211)  评论(0编辑  收藏  举报