summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-05 14:42:14 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-05 14:42:14 +0200
commit77a5d94974f546fb5f1cb04cfca4dbdf54f1d46b (patch)
treefd3ac1cf0c3d7ea54fd69e38f19478754cd20047 /system
parent014a4d23c4805d5aa81b2feb0f9694611a372a9f (diff)
Add a default _count_string property
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_driver.php7
-rw-r--r--system/database/drivers/cubrid/cubrid_driver.php6
-rw-r--r--system/database/drivers/ibase/ibase_driver.php8
-rw-r--r--system/database/drivers/mssql/mssql_driver.php6
-rw-r--r--system/database/drivers/mysql/mysql_driver.php6
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php6
-rw-r--r--system/database/drivers/odbc/odbc_driver.php6
-rw-r--r--system/database/drivers/pdo/pdo_driver.php6
-rw-r--r--system/database/drivers/postgre/postgre_driver.php6
-rw-r--r--system/database/drivers/sqlite/sqlite_driver.php6
-rw-r--r--system/database/drivers/sqlite3/sqlite3_driver.php6
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php6
12 files changed, 8 insertions, 67 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index ebf828c4e..d5367b4d2 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -78,6 +78,13 @@ abstract class CI_DB_driver {
protected $_reserved_identifiers = array('*'); // Identifiers that should NOT be escaped
/**
+ * 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 ';
+
+ /**
* Constructor
*
* @param array
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/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php
index a257e3c55..c9027670d 100644
--- a/system/database/drivers/ibase/ibase_driver.php
+++ b/system/database/drivers/ibase/ibase_driver.php
@@ -49,13 +49,7 @@ class CI_DB_ibase_driver extends CI_DB {
protected $_like_escape_str = " ESCAPE '%s' ";
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 = ' Random()'; // database specific random keyword
+ protected $_random_keyword = ' Random()'; // database specific random keyword
// Keeps track of the resource for the current transaction
protected $trans;
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 3026b36dc..1714704a8 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -49,12 +49,6 @@ class CI_DB_mssql_driver extends CI_DB {
protected $_like_escape_str = " ESCAPE '%s' ";
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() methods.
- */
- protected $_count_string = 'SELECT COUNT(*) AS ';
protected $_random_keyword = ' NEWID()';
// MSSQL-specific properties
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index d11f015a6..29db90408 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -49,12 +49,6 @@ class CI_DB_mysql_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
/**
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index d1581bf1a..be61aab20 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -49,12 +49,6 @@ class CI_DB_mysqli_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
/**
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index bd5759289..8f0a474b0 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -49,12 +49,6 @@ class CI_DB_odbc_driver extends CI_DB {
protected $_like_escape_str = " {escape '%s'} ";
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;
public function __construct($params)
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index a3ad46900..3ef376ca5 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -49,12 +49,6 @@ class CI_DB_pdo_driver extends CI_DB {
protected $_like_escape_str = " ESCAPE '%s' ";
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;
// need to track the pdo driver and options
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index e73122bc7..20b78673e 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -48,12 +48,6 @@ class CI_DB_postgre_driver extends CI_DB {
protected $_like_escape_str = " ESCAPE '%s' ";
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 = ' RANDOM()'; // database specific random keyword
/**
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php
index 87be7a54a..19824dbbf 100644
--- a/system/database/drivers/sqlite/sqlite_driver.php
+++ b/system/database/drivers/sqlite/sqlite_driver.php
@@ -49,12 +49,6 @@ class CI_DB_sqlite_driver extends CI_DB {
protected $_like_escape_str = " ESCAPE '%s' ";
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 = ' Random()'; // database specific random keyword
/**
diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php
index 1c6533f22..cc35d319f 100644
--- a/system/database/drivers/sqlite3/sqlite3_driver.php
+++ b/system/database/drivers/sqlite3/sqlite3_driver.php
@@ -50,12 +50,6 @@ class CI_DB_sqlite3_driver extends CI_DB {
protected $_like_escape_str = ' ESCAPE \'%s\' ';
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 = ' RANDOM()';
/**
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index 3a4fc0aff..8bd18bd76 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -49,12 +49,6 @@ class CI_DB_sqlsrv_driver extends CI_DB {
protected $_like_escape_str = " ESCAPE '%s' ";
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 = ' NEWID()';
// SQLSRV-specific properties