diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-04-06 19:50:07 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-04-06 19:50:07 +0200 |
commit | ea09a8a5552f2aacdeab0c88a605fe44047ebd0a (patch) | |
tree | ecb4f682b436653f82bd23cc6fb479531b07c6ba /system/database/drivers/cubrid/cubrid_driver.php | |
parent | e9f2095056a579bad9bf2ad80116cc8454f6520e (diff) |
Renamed _escape_identifiers() to escape_identifiers() and moved it to CI_DB_driver
Diffstat (limited to 'system/database/drivers/cubrid/cubrid_driver.php')
-rw-r--r-- | system/database/drivers/cubrid/cubrid_driver.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index b2ccec2d4..74d1a850a 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -435,45 +435,6 @@ class CI_DB_cubrid_driver extends CI_DB { return array('code' => cubrid_errno($this->conn_id), 'message' => cubrid_error($this->conn_id)); } - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @param string - * @return string - */ - public function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - // -------------------------------------------------------------------- /** |