Fix issue #182 in system/database/drivers/oci8_result.php by caching the num_rows property after statement execution
diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php
index 88531b4..2713f6f 100644
--- a/system/database/drivers/oci8/oci8_result.php
+++ b/system/database/drivers/oci8/oci8_result.php
@@ -42,15 +42,18 @@
 	 */
 	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 @@
 
 
 /* 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 */