From 3f643e678ef64ae29aa9720aef9b2a40496a5343 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 27 Oct 2006 06:25:31 +0000 Subject: --- system/database/drivers/oci8/oci8_result.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'system/database') 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; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b