Changeset 42 for trunk/bin/module_maker/sql.cli.php
- Timestamp:
- Dec 18, 2005 12:16:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/sql.cli.php
r41 r42 56 56 if (is_array($cols) && !empty($cols)) { 57 57 foreach ($cols as $col) { 58 58 59 59 // Human readable. 60 60 $field = $col[0]; 61 61 $type = preg_replace('/^(\w+).*$/', '\\1', $col[1]); 62 62 $is_primary_key = ('PRI' == $col[3]); 63 63 64 64 $sort_columns .= "\$so->setColumn('$field', '$field ASC', '$field DESC');\n"; 65 65 66 66 if ($is_primary_key) { 67 67 // This is the primary key. Deal with separately. … … 84 84 } 85 85 } 86 86 87 87 } else { 88 88 die(basename($_SERVER['argv'][0]) . " Warning: $db_tbl does not have any columns.\n");
Note: See TracChangeset
for help on using the changeset viewer.