Fix pdo_result num_rows() for subdrivers that don't support rowCount()
diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php
index 322da8d..b45e741 100644
--- a/system/database/drivers/pdo/pdo_result.php
+++ b/system/database/drivers/pdo/pdo_result.php
@@ -56,9 +56,9 @@
{
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());