- Patch #1266694 by Damien Tournoud: Fixed DatabaseStatementPrefetch doesn't implement fetchColumn().
parent
168c1364ab
commit
eeac53e45f
|
@ -370,7 +370,7 @@ class DatabaseStatementPrefetch implements Iterator, DatabaseStatementInterface
|
|||
}
|
||||
}
|
||||
|
||||
public function fetchField($index = 0) {
|
||||
public function fetchColumn($index = 0) {
|
||||
if (isset($this->currentRow) && isset($this->columnNames[$index])) {
|
||||
// We grab the value directly from $this->data, and format it.
|
||||
$return = $this->currentRow[$this->columnNames[$index]];
|
||||
|
@ -382,6 +382,10 @@ class DatabaseStatementPrefetch implements Iterator, DatabaseStatementInterface
|
|||
}
|
||||
}
|
||||
|
||||
public function fetchField($index = 0) {
|
||||
return $this->fetchColumn($index);
|
||||
}
|
||||
|
||||
public function fetchObject($class_name = NULL, $constructor_args = array()) {
|
||||
if (isset($this->currentRow)) {
|
||||
if (!isset($class_name)) {
|
||||
|
|
Loading…
Reference in New Issue