summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/oci8/oci8_result.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2011-09-23 16:28:13 +0200
committerTimothy Warren <tim@timshomepage.net>2011-09-23 16:28:13 +0200
commit4d292bdb56ba6afc26878d9bcd82892f48d9f1a4 (patch)
treea894323d2e896adcb7d25d7d1edb806295147384 /system/database/drivers/oci8/oci8_result.php
parent5fc36d8c9dc0bd5d41ed7dea36f999c6e07e1615 (diff)
parentd26133be24eef68b1bead61e7e808f4424a71a0a (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/oci8/oci8_result.php')
-rw-r--r--system/database/drivers/oci8/oci8_result.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php
index 88531b436..2713f6f12 100644
--- a/system/database/drivers/oci8/oci8_result.php
+++ b/system/database/drivers/oci8/oci8_result.php
@@ -42,15 +42,18 @@ class CI_DB_oci8_result extends CI_DB_result {
*/
function num_rows()
{
- $rowcount = count($this->result_array());
- @ociexecute($this->stmt_id);
-
- if ($this->curs_id)
+ if ($this->num_rows === 0 && count($this->result_array()) > 0)
{
- @ociexecute($this->curs_id);
+ $this->num_rows = count($this->result_array());
+ @ociexecute($this->stmt_id);
+
+ if ($this->curs_id)
+ {
+ @ociexecute($this->curs_id);
+ }
}
- return $rowcount;
+ return $this->num_rows;
}
// --------------------------------------------------------------------
@@ -246,4 +249,4 @@ class CI_DB_oci8_result extends CI_DB_result {
/* End of file oci8_result.php */
-/* Location: ./system/database/drivers/oci8/oci8_result.php */ \ No newline at end of file
+/* Location: ./system/database/drivers/oci8/oci8_result.php */