summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/cubrid/cubrid_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-01-26 13:43:16 +0100
committerAndrey Andreev <narf@bofh.bg>2012-01-26 13:43:16 +0100
commitc6953f4077fe3ee394abb37eaa0575527bd013cc (patch)
treedcdc5b8e7f0282ab6096435901711b55c29de26c /system/database/drivers/cubrid/cubrid_forge.php
parent69a6093da35640482a8394ca66686e045304b0e3 (diff)
Fix _limit()
Diffstat (limited to 'system/database/drivers/cubrid/cubrid_forge.php')
-rw-r--r--system/database/drivers/cubrid/cubrid_forge.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/cubrid/cubrid_forge.php b/system/database/drivers/cubrid/cubrid_forge.php
index d277ca394..4b1c2839a 100644
--- a/system/database/drivers/cubrid/cubrid_forge.php
+++ b/system/database/drivers/cubrid/cubrid_forge.php
@@ -89,13 +89,13 @@ 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).'"'
- .(isset($attributes['NAME']) ? ' '.$this->db->protect_identifiers($attributes['NAME']).' ' : '');
+ .( ! empty($attributes['NAME']) ? ' '.$this->db->protect_identifiers($attributes['NAME']).' ' : '');
if ( ! empty($attributes['TYPE']))
{
$sql .= ' '.$attributes['TYPE'];
- if (isset($attributes['CONSTRAINT']))
+ if ( ! empty($attributes['CONSTRAINT']))
{
switch ($attributes['TYPE'])
{
@@ -125,9 +125,9 @@ class CI_DB_cubrid_forge extends CI_DB_forge {
*/
$sql .= (isset($attributes['DEFAULT']) ? " DEFAULT '".$attributes['DEFAULT']."'" : '')
- .((isset($attributes['NULL']) && $attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL')
- .((isset($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) ? ' AUTO_INCREMENT' : '')
- .((isset($attributes['UNIQUE']) && $attributes['UNIQUE'] === TRUE) ? ' UNIQUE' : '');
+ .(( ! empty($attributes['NULL']) && $attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL')
+ .(( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) ? ' AUTO_INCREMENT' : '')
+ .(( ! empty($attributes['UNIQUE']) && $attributes['UNIQUE'] === TRUE) ? ' UNIQUE' : '');
}
// don't add a comma on the end of the last field