summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-05 15:20:15 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-05 15:20:15 +0200
commit7ca36131d881d3f83a86d824263d4abd65439e12 (patch)
tree385876824b417014187291209eb22a27bfc0af36 /system
parent77a5d94974f546fb5f1cb04cfca4dbdf54f1d46b (diff)
Fix pdo_result num_rows() for subdrivers that don't support rowCount()
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/pdo/pdo_result.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php
index 322da8d37..b45e74195 100644
--- a/system/database/drivers/pdo/pdo_result.php
+++ b/system/database/drivers/pdo/pdo_result.php
@@ -56,9 +56,9 @@ class CI_DB_pdo_result extends CI_DB_result {
{
return $this->num_rows = count($this->result_object);
}
- elseif (($this->num_rows = $this->result_id->rowCount()) > 0)
+ elseif (($num_rows = $this->result_id->rowCount()) > 0)
{
- return $this->num_rows;
+ return $this->num_rows = $num_rows;
}
return $this->num_rows = count($this->result_array());