summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/oci8/oci8_result.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/oci8/oci8_result.php')
-rw-r--r--system/database/drivers/oci8/oci8_result.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php
index 947a76109..efb2f7bed 100644
--- a/system/database/drivers/oci8/oci8_result.php
+++ b/system/database/drivers/oci8/oci8_result.php
@@ -38,18 +38,14 @@ class CI_DB_oci8_result extends CI_DB_result {
*/
function num_rows()
{
- // get the results, count them,
- // rerun query - otherwise we
- // won't have data after calling
- // num_rows()
- $this->result_array();
- $rowcount = count($this->result_array);
- @ociexecute($this->stmt_id);
- if ($this->curs_id)
+ if (function_exists('oci_num_rows'))
+ {
+ return @oci_num_rows($this->stmt_id);
+ }
+ else
{
- @ociexecute($this->curs_id);
+ return @ocirowcount($this->stmt_id)
}
- return $rowcount;
}
// --------------------------------------------------------------------