summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/cubrid
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/cubrid')
-rw-r--r--system/database/drivers/cubrid/cubrid_driver.php6
-rw-r--r--system/database/drivers/cubrid/cubrid_result.php5
2 files changed, 4 insertions, 7 deletions
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php
index 7496ee42f..a3d0287f5 100644
--- a/system/database/drivers/cubrid/cubrid_driver.php
+++ b/system/database/drivers/cubrid/cubrid_driver.php
@@ -49,12 +49,6 @@ class CI_DB_cubrid_driver extends CI_DB {
protected $_like_escape_str = '';
protected $_like_escape_chr = '';
- /**
- * The syntax to count rows is slightly different across different
- * database engines, so this string appears in each driver and is
- * used for the count_all() and count_all_results() functions.
- */
- protected $_count_string = 'SELECT COUNT(*) AS ';
protected $_random_keyword = ' RAND()'; // database specific random keyword
// CUBRID-specific properties
diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php
index 3eb9f7e3d..4c3978163 100644
--- a/system/database/drivers/cubrid/cubrid_result.php
+++ b/system/database/drivers/cubrid/cubrid_result.php
@@ -33,6 +33,7 @@
* @category Database
* @author Esen Sagynov
* @link http://codeigniter.com/user_guide/database/
+ * @since 2.1
*/
class CI_DB_cubrid_result extends CI_DB_result {
@@ -43,7 +44,9 @@ class CI_DB_cubrid_result extends CI_DB_result {
*/
public function num_rows()
{
- return @cubrid_num_rows($this->result_id);
+ return is_int($this->num_rows)
+ ? $this->num_rows
+ : $this->num_rows = @cubrid_num_rows($this->result_id);
}
// --------------------------------------------------------------------