From 3a4cdc62042c56da9527e6d1d4c1ab5417839e1c Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 17 Feb 2012 13:59:44 -0500 Subject: Workaround to fix method --- .../drivers/interbase/interbase_result.php | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'system/database/drivers/interbase/interbase_result.php') diff --git a/system/database/drivers/interbase/interbase_result.php b/system/database/drivers/interbase/interbase_result.php index 3d5721138..37f0a108c 100644 --- a/system/database/drivers/interbase/interbase_result.php +++ b/system/database/drivers/interbase/interbase_result.php @@ -183,6 +183,68 @@ class CI_DB_interbase_result extends CI_DB_result { return @ibase_fetch_object($this->result_id); } + + // -------------------------------------------------------------------- + + /** + * Query result. "object" version. + * + * @return object + */ + public function result_object() + { + if (count($this->result_object) > 0) + { + return $this->result_object; + } + + // In the event that query caching is on the result_id variable + // will return FALSE since there isn't a valid SQL resource so + // we'll simply return an empty array. + if ($this->result_id === FALSE) + { + return array(); + } + + $this->num_rows = 0; + while ($row = $this->_fetch_object()) + { + $this->result_object[] = $row; + } + + return $this->result_object; + } + + // -------------------------------------------------------------------- + + /** + * Query result. "array" version. + * + * @return array + */ + public function result_array() + { + if (count($this->result_array) > 0) + { + return $this->result_array; + } + + // In the event that query caching is on the result_id variable + // will return FALSE since there isn't a valid SQL resource so + // we'll simply return an empty array. + if ($this->result_id === FALSE) + { + return array(); + } + + $this->num_rows = 0; + while ($row = $this->_fetch_assoc()) + { + $this->result_array[] = $row; + } + + return $this->result_array; + } } -- cgit v1.2.3-24-g4f1b