diff options
author | Greg Aker <greg@gregaker.net> | 2011-08-30 02:31:48 +0200 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-08-30 02:31:48 +0200 |
commit | b50df5f018176c0cd0ad498e9c710a2b0b016a80 (patch) | |
tree | 95733dbbcc348a92aad5d979db2e5da471859c25 /system/database/drivers/mysql/mysql_result.php | |
parent | c964e72aabc3a646dbb82f6bf609e9532e75d011 (diff) | |
parent | d7a28663344fbb760134b5623b8cb441f4875f80 (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/mysql/mysql_result.php')
-rw-r--r-- | system/database/drivers/mysql/mysql_result.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 2d2905c98..6ceaf4b9b 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -86,10 +86,10 @@ class CI_DB_mysql_result extends CI_DB_result { $retval = array(); while ($field = mysql_fetch_object($this->result_id)) { - preg_match('/([a-zA-Z]+)\((\d+)\)/', $field->Type, $matches); + preg_match('/([a-zA-Z]+)(\((\d+)\))?/i', $field->Type, $matches); $type = $matches[1]; - $length = (int)$matches[2]; + $length = isset($matches[3]) ? (int) $matches[3] : NULL; $F = new stdClass(); $F->name = $field->Field; |