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开始, 数组值是对象。