From f3365697b70384de8f03e745ef404b66d62c84b0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 11 Sep 2011 13:00:57 -0400 Subject: - Patch #1266694 by Damien Tournoud: Fixed DatabaseStatementPrefetch doesn't implement fetchColumn(). --- includes/database/prefetch.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/database/prefetch.inc b/includes/database/prefetch.inc index f378d3555..4f2b19d1f 100644 --- a/includes/database/prefetch.inc +++ b/includes/database/prefetch.inc @@ -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)) { -- cgit v1.2.3