summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2011-08-20 15:59:15 +0200
committerDerek Jones <derek.jones@ellislab.com>2011-08-20 15:59:15 +0200
commitd9489e0ca676905c16c7a8c0f03011cc12b634f9 (patch)
tree809872634daf234591fabacbca8df2203d35b509 /system/database/drivers/mysqli
parentabccc2fa65eea5f64773952661a8ba79e559333b (diff)
parentb8c038a3e7742f32915d7f1ab69627075e8d0c39 (diff)
Merge branch 'release/v2.0.3'
Diffstat (limited to 'system/database/drivers/mysqli')
-rw-r--r--system/database/drivers/mysqli/mysqli_forge.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index d5097335e..260549457 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.php
@@ -104,9 +104,13 @@ class CI_DB_mysqli_forge extends CI_DB_forge {
$sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\'';
}
- if (array_key_exists('NULL', $attributes))
+ if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
{
- $sql .= ($attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL';
+ $sql .= ' NULL';
+ }
+ else
+ {
+ $sql .= ' NOT NULL';
}
if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE)