diff --git a/core/models/mvc_database_adapter.php b/core/models/mvc_database_adapter.php index 7175fdc..3ae875b 100644 --- a/core/models/mvc_database_adapter.php +++ b/core/models/mvc_database_adapter.php @@ -184,10 +184,13 @@ public function get_insert_columns_sql($data) { public function get_insert_values_sql($data) { $values = array(); foreach ($data as $value) { - if($value == null){ + if ($value === null) { $values[] = 'NULL'; - } - else{ + } elseif ($value === false) { + $values[] = 'FALSE'; + } elseif ($value === true) { + $values[] = 'TRUE'; + } else { $values[] = '"'.$this->escape($value).'"'; } } @@ -238,4 +241,4 @@ public function delete_all($options) { } -?> \ No newline at end of file +?>