summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/oci8
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-02-10 22:46:18 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-02-10 22:46:18 +0100
commit156481371306db532d6b3880d0914e9237b93685 (patch)
treee523a9e2dfc0775a682549644a4f8fb0df77e7ec /system/database/drivers/oci8
parent26c7a9c3757b27a632be453be7adb4eca29baa2f (diff)
changes for enhanced database compatibility
Diffstat (limited to 'system/database/drivers/oci8')
-rw-r--r--system/database/drivers/oci8/oci8_driver.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index 7aab37e82..8f63c25a5 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -556,7 +556,7 @@ class CI_DB_oci8_driver extends CI_DB {
}
// This function may get "item1 item2" as a string, and so
- // we may need "`item1` `item2`" and not "`item1 item2`"
+ // we may need ""item1" "item2"" and not ""item1 item2""
if (ctype_alnum($item) === FALSE)
{
if (strpos($item, '.') !== FALSE)
@@ -566,14 +566,14 @@ class CI_DB_oci8_driver extends CI_DB {
$item = (strpos($aliased_tables, $table_name) !== FALSE) ? $item = $item : $this->dbprefix.$item;
}
- // This function may get "field >= 1", and need it to return "`field` >= 1"
+ // This function may get "field >= 1", and need it to return ""field" >= 1"
$lbound = ($first_word_only === TRUE) ? '' : '|\s|\(';
- $item = preg_replace('/(^'.$lbound.')([\w\d\-\_]+?)(\s|\)|$)/iS', '$1`$2`$3', $item);
+ $item = preg_replace('/(^'.$lbound.')([\w\d\-\_]+?)(\s|\)|$)/iS', '$1"$2"$3', $item);
}
else
{
- return "`{$item}`";
+ return "\"{$item}\"";
}
$exceptions = array('AS', '/', '-', '%', '+', '*');
@@ -581,9 +581,9 @@ class CI_DB_oci8_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;
@@ -608,7 +608,7 @@ class CI_DB_oci8_driver extends CI_DB {
$tables = array($tables);
}
- return '('.implode(', ', $tables).')';
+ return implode(', ', $tables);
}
// --------------------------------------------------------------------