diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-02-11 07:06:59 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-02-11 07:06:59 +0100 |
commit | 903cc985da13463369a4cb1831ccbe5449316ee7 (patch) | |
tree | 653d63d319035161e5aa4b1eb864ba6afad54215 /system | |
parent | 3535caa4eb9b455be1b041d9056a02e81d4e35a7 (diff) |
remove backticks from ODBC
Diffstat (limited to 'system')
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index fd2460853..bdedab32f 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -386,11 +386,7 @@ class CI_DB_odbc_driver extends CI_DB { */
function _escape_table($table)
{
- if (strpos($table, '.') !== FALSE)
- {
- $table = '`' . str_replace('.', '`.`', $table) . '`';
- }
-
+ // used to add backticks in other db drivers
return $table;
}
@@ -438,7 +434,7 @@ class CI_DB_odbc_driver extends CI_DB { }
else
{
- return "`{$item}`";
+ return "{$item}";
}
$exceptions = array('AS', '/', '-', '%', '+', '*');
@@ -446,9 +442,9 @@ class CI_DB_odbc_driver extends CI_DB { foreach ($exceptions as $exception)
{
- if (stristr($item, " `{$exception}` ") !== FALSE)
+ if (stristr($item, " {$exception} ") !== FALSE)
{
- $item = preg_replace('/ `('.preg_quote($exception).')` /i', ' $1 ', $item);
+ $item = preg_replace('/ ('.preg_quote($exception).') /i', ' $1 ', $item);
}
}
return $item;
|