summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlite3/sqlite3_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-12 14:41:49 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-12 14:41:49 +0100
commitdc3de15b02eb768cf9e0a410b0d914523d019a67 (patch)
treed92b5a120f5cc7a649a4d3dac1385612e630e469 /system/database/drivers/sqlite3/sqlite3_driver.php
parentab350e0f6f6aadd9fafa0440a8b16dfcdcec9a41 (diff)
Fix escape_str() and change _prep_query() to just return the query
Diffstat (limited to 'system/database/drivers/sqlite3/sqlite3_driver.php')
-rw-r--r--system/database/drivers/sqlite3/sqlite3_driver.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php
index ae0091cea..ed081102b 100644
--- a/system/database/drivers/sqlite3/sqlite3_driver.php
+++ b/system/database/drivers/sqlite3/sqlite3_driver.php
@@ -146,7 +146,6 @@ class CI_DB_sqlite3_driver extends CI_DB {
protected function _execute($sql)
{
// TODO: Implement use of SQLite3::querySingle(), if needed
- // TODO: Use $this->_prep_query(), if needed
return $this->is_write_type($sql)
? $this->conn_id->exec($sql)
@@ -165,7 +164,7 @@ class CI_DB_sqlite3_driver extends CI_DB {
*/
protected function _prep_query($sql)
{
- return $this->conn_id->prepare($sql);
+ return $sql;
}
// --------------------------------------------------------------------
@@ -253,8 +252,8 @@ class CI_DB_sqlite3_driver extends CI_DB {
// escape LIKE condition wildcards
if ($like === TRUE)
{
- return str_replace(array('%', '_', $this->_like_escape_chr),
- array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
+ return str_replace(array($this->_like_escape_chr, '%', '_'),
+ array($this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'%', $this->_like_escape_chr.'_'),
$str);
}