diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index b41b929..90f58ae 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -486,8 +486,9 @@
 			
 		$sql = $this->_compile_select();
 
+		$result = $this->query($sql);
 		$this->_reset_select();
-		return $this->query($sql);		
+		return $result;
 	}
 
 	// --------------------------------------------------------------------
@@ -522,8 +523,9 @@
 			
 		$sql = $this->_compile_select();
 
+		$result = $this->query($sql);
 		$this->_reset_select();
-		return $this->query($sql);		
+		return $result;
 	}
 	
 	// --------------------------------------------------------------------