function Statement::fetchAll
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Statement.php \Drupal\Core\Database\Statement::fetchAll()
Overrides StatementInterface::fetchAll
1 call to Statement::fetchAll()
- Statement::fetchCol in core/
lib/ Drupal/ Core/ Database/ Statement.php - Returns an entire single column of a result set as an indexed array.
File
-
core/
lib/ Drupal/ Core/ Database/ Statement.php, line 169
Class
- Statement
- Default implementation of StatementInterface.
Namespace
Drupal\Core\DatabaseCode
public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
// Call \PDOStatement::fetchAll to fetch all rows.
// \PDOStatement is picky about the number of arguments in some cases so we
// need to be pass the exact number of arguments we where given.
switch (func_num_args()) {
case 0:
return parent::fetchAll();
case 1:
return parent::fetchAll($mode);
case 2:
return parent::fetchAll($mode, $column_index);
case 3:
default:
return parent::fetchAll($mode, $column_index, $constructor_arguments);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.