summaryrefslogtreecommitdiffstats
path: root/system/database/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers')
-rw-r--r--system/database/drivers/odbc/odbc_result.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php
index db3576d35..b040c1e72 100644
--- a/system/database/drivers/odbc/odbc_result.php
+++ b/system/database/drivers/odbc/odbc_result.php
@@ -36,6 +36,8 @@
*/
class CI_DB_odbc_result extends CI_DB_result {
+ public $num_rows;
+
/**
* Number of rows in the result set
*
@@ -43,7 +45,7 @@ class CI_DB_odbc_result extends CI_DB_result {
*/
public function num_rows()
{
- if ($this->num_rows > 0)
+ if (is_int($this->num_rows))
{
return $this->num_rows;
}
@@ -51,7 +53,7 @@ class CI_DB_odbc_result extends CI_DB_result {
// Work-around for ODBC subdrivers that don't support num_rows()
if (($this->num_rows = @odbc_num_rows($this->result_id)) === -1)
{
- return $this->num_rows = count($this->result_array());
+ $this->num_rows = count($this->result_array());
}
return $this->num_rows;