Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If no DEFAULT value is set in CUBRID, the driver returns an empty str…

…ing. To return the same result as MySQL, CUBRID Driver for CI also returns NULL.
  • Loading branch information...
commit f1c156d670d3cf24d3ae75e8aee876a66ec2bd9e 1 parent 31dda35
@kadishmal kadishmal authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  system/database/drivers/cubrid/cubrid_result.php
2  system/database/drivers/cubrid/cubrid_result.php
@@ -93,7 +93,7 @@ public function field_data()
// CUBRID returns type as varchar(100) for example,
// that's why we need to remove all brackets and digits.
$F->type = preg_replace('/[\d()]/', '', $field->type);
- $F->default = $field->def;
+ $F->default = $field->def == '' ? NULL : $field->def;
// use CUBRID's native API to obtain column's max_length,
// otherwise $field->max_length returns incorrect info.
// See #150.
Please sign in to comment.
Something went wrong with that request. Please try again.