summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-01 14:19:00 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-01 14:19:00 +0100
commitca365356e49ee32a1f03aa2d58f452b2a494268c (patch)
treeaac1d25a17da8159aac55c340bf40e5f0b432e1b /system/database/drivers/odbc
parent3aaca2523de1a733c18473299cd3c72c9497869c (diff)
parentef795ac23320c4636152af03c8600f2115f1e6e3 (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/odbc')
-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;