summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysql/mysql_result.php
diff options
context:
space:
mode:
authorpurandi <free6300@gmail.com>2011-09-04 14:51:23 +0200
committerpurandi <free6300@gmail.com>2011-09-04 14:51:23 +0200
commitab0dbd4b992778678e00ea3f2a3dd4bf5f1ff504 (patch)
tree740d3cabe5e51f18578a72abf6e13e62fba9eb62 /system/database/drivers/mysql/mysql_result.php
parentdcf3d1bf17e1354ff0a644f390ed590f2e65298b (diff)
parent2eb2557bf1c438d8fb7d612dbb76c6676eaec4d6 (diff)
Merge branch 'develop', remote-tracking branch 'origin/develop' into develop
Diffstat (limited to 'system/database/drivers/mysql/mysql_result.php')
-rw-r--r--system/database/drivers/mysql/mysql_result.php4
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;