function PdoTrait::clientFetchColumn

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/Statement/PdoTrait.php \Drupal\Core\Database\Statement\PdoTrait::clientFetchColumn()

Returns a single column from the next row of a result set.

Parameters

int $column: 0-indexed number of the column to retrieve from the row. If no value is supplied, the first column is fetched.

Return value

scalar|null|false A single column from the next row of a result set or false if there are no more rows.

Deprecated

in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement.

See also

https://www.drupal.org/node/3611848

File

core/lib/Drupal/Core/Database/Statement/PdoTrait.php, line 184

Class

PdoTrait
A trait for calling \PDOStatement methods.

Namespace

Drupal\Core\Database\Statement

Code

protected function clientFetchColumn(int $column = 0) : int|float|string|bool|null {
  @trigger_error(__METHOD__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3611848', E_USER_DEPRECATED);
  return $this->getClientStatement()
    ->fetchColumn($column);
}

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