summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
Diffstat (limited to 'system/database')
-rw-r--r--system/database/drivers/cubrid/cubrid_driver.php8
-rw-r--r--system/database/drivers/cubrid/cubrid_forge.php4
2 files changed, 6 insertions, 6 deletions
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php
index ef0b5b451..9b5d86aa6 100644
--- a/system/database/drivers/cubrid/cubrid_driver.php
+++ b/system/database/drivers/cubrid/cubrid_driver.php
@@ -545,7 +545,7 @@ class CI_DB_cubrid_driver extends CI_DB
*/
function _insert($table, $keys, $values)
{
- return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
+ return "INSERT INTO ".$table." (\"".implode('\", \"', $keys)."\") VALUES (".implode(', ', $values).")";
}
// --------------------------------------------------------------------
@@ -564,7 +564,7 @@ class CI_DB_cubrid_driver extends CI_DB
*/
function _replace($table, $keys, $values)
{
- return "REPLACE INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
+ return "REPLACE INTO ".$table." (\"".implode('", "', $keys)."\") VALUES (".implode(', ', $values).")";
}
// --------------------------------------------------------------------
@@ -582,7 +582,7 @@ class CI_DB_cubrid_driver extends CI_DB
*/
function _insert_batch($table, $keys, $values)
{
- return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values);
+ return "INSERT INTO ".$table." (\"".implode('", "', $keys)."\") VALUES ".implode(', ', $values);
}
// --------------------------------------------------------------------
@@ -605,7 +605,7 @@ class CI_DB_cubrid_driver extends CI_DB
{
foreach ($values as $key => $val)
{
- $valstr[] = $key . ' = ' . $val;
+ $valstr[] = sprintf('"%s" = %s', $key, $val);
}
$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php
index c2c553f28..1de0db108 100644
--- a/system/database/drivers/cubrid/cubrid_forge.php
+++ b/system/database/drivers/cubrid/cubrid_forge.php
@@ -81,7 +81,7 @@ class CI_DB_cubrid_forge extends CI_DB_forge {
{
$attributes = array_change_key_case($attributes, CASE_UPPER);
- $sql .= "\n\t".$this->db->_protect_identifiers($field);
+ $sql .= "\n\t\"".$this->db->_protect_identifiers($field) . "\"";
if (array_key_exists('NAME', $attributes))
{
@@ -203,7 +203,7 @@ class CI_DB_cubrid_forge extends CI_DB_forge {
$key = array($key_name);
}
- $sql .= ",\n\tKEY {$key_name} (" . implode(', ', $key) . ")";
+ $sql .= ",\n\tKEY \"{$key_name}\" (" . implode(', ', $key) . ")";
}
}