diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-04 14:56:56 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-04 14:56:56 +0200 |
commit | 9d533aef135dff9dd3465f993283d6e49a9983a5 (patch) | |
tree | 136b1dc1fb2b9db46ac6d7086fb51dc1d04b277d /system/database/drivers | |
parent | 5036c9caabb12f90b9533d7fb417610e02a652ff (diff) |
Fix an SQLite3 pconnect() bug + other minor changes
Diffstat (limited to 'system/database/drivers')
-rw-r--r-- | system/database/drivers/cubrid/cubrid_driver.php | 2 | ||||
-rw-r--r-- | system/database/drivers/sqlite/sqlite_driver.php | 6 | ||||
-rw-r--r-- | system/database/drivers/sqlite3/sqlite3_driver.php | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 971f1ea7b..6b9286fa0 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -469,7 +469,7 @@ class CI_DB_cubrid_driver extends CI_DB { */ protected function _limit($sql, $limit, $offset) { - return $sql.'LIMIT '.($offset === 0 ? '' : $offset.', ').$limit; + return $sql.'LIMIT '.($offset == 0 ? '' : $offset.', ').$limit; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index d9820e1b3..f52b1ba1b 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -404,16 +404,16 @@ class CI_DB_sqlite_driver extends CI_DB { */ protected function _limit($sql, $limit, $offset) { - if ($offset === 0) + if ($offset == 0) { $offset = ''; } else { - $offset .= ", "; + $offset .= ', '; } - return $sql."LIMIT ".$offset.$limit; + return $sql.'LIMIT '.$offset.$limit; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index ea4cf2d4f..a74c528ad 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -87,7 +87,7 @@ class CI_DB_sqlite3_driver extends CI_DB { public function db_pconnect() { log_message('debug', 'SQLite3 doesn\'t support persistent connections'); - return $this->db_pconnect(); + return $this->db_connect(); } // -------------------------------------------------------------------- |