function StatementInterface::fetchField
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Database/StatementInterface.php \Drupal\Core\Database\StatementInterface::fetchField()
- 10 core/lib/Drupal/Core/Database/StatementInterface.php \Drupal\Core\Database\StatementInterface::fetchField()
- 9 core/lib/Drupal/Core/Database/StatementInterface.php \Drupal\Core\Database\StatementInterface::fetchField()
- 8.9.x core/lib/Drupal/Core/Database/StatementInterface.php \Drupal\Core\Database\StatementInterface::fetchField()
Returns a single column value from the next record of a result set.
Parameters
int $index: (Optional) The numeric index of the column to return. Defaults to the first one.
Return value
mixed A single column value from the next record, or FALSE if there is no next record.
Throws
\ValueError If there is a record and the column index is not defined.
1 method overrides StatementInterface::fetchField()
- StatementBase::fetchField in core/
lib/ Drupal/ Core/ Database/ Statement/ StatementBase.php
File
-
core/
lib/ Drupal/ Core/ Database/ StatementInterface.php, line 111
Class
- StatementInterface
- Represents a prepared statement.
Namespace
Drupal\Core\DatabaseCode
public function fetchField(int $index = 0);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.