Fixed bug preventing correct detection of enums under mysqli. MDL-14215 ; merged...
authorstronk7 <stronk7>
Fri, 4 Apr 2008 19:55:26 +0000 (19:55 +0000)
committerstronk7 <stronk7>
Fri, 4 Apr 2008 19:55:26 +0000 (19:55 +0000)
lib/adodb/drivers/adodb-mysqli.inc.php

index 3d080e4b5e08fcd3fc243721426abb3944da6f99..0070c917d105f8be760d7ffdaa6727fe71521afc 100644 (file)
@@ -555,6 +555,8 @@ class ADODB_mysqli extends ADOConnection {
                                $fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
                        } elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) {
                                $fld->type = $query_array[1];
+                               $arr = explode(",",$query_array[2]);
+                               $fld->enums = $arr;
                                $fld->max_length = max(array_map("strlen",explode(",",$query_array[2]))) - 2; // PHP >= 4.0.6
                                $fld->max_length = ($fld->max_length == 0 ? 1 : $fld->max_length);
                        } else {
@@ -1128,4 +1130,4 @@ class ADORecordSet_array_mysqli extends ADORecordSet_array {
   
 }
 
-?>
\ No newline at end of file
+?>