function Statement::fetchCol

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Database/Statement.php \Drupal\Core\Database\Statement::fetchCol()

Overrides StatementInterface::fetchCol

File

core/lib/Drupal/Core/Database/Statement.php, line 94

Class

Statement
Default implementation of StatementInterface.

Namespace

Drupal\Core\Database

Code

public function fetchCol($index = 0) {
    return $this->fetchAll(\PDO::FETCH_COLUMN, $index);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.