Notes re:phpMyEdit Version 5.4 (released 2004-02-20) Typical field arrays looks something like this: $opts['fdd']['id'] = array( 'name' => 'ID', 'select' => 'T', 'options' => 'AVCPDR', 'maxlen' => 8, 'default' => '0', 'sort' => true ); $opts['fdd']['organization'] = array( 'name' => 'Organization', 'select' => 'T', 'maxlen' => 8, 'default' => '0', 'required' => false, 'sort' => true ); $opts['fdd']['name'] = array( 'name' => 'Name', 'select' => 'T', 'maxlen' => 155, 'sort' => true ); $opts['fdd']['comments'] = array( 'name' => 'Comments', 'select' => 'T', 'maxlen' => 65535, 'textarea' => array( 'rows' => 5, 'cols' => 50), 'sort' => true ); Each field array can include display mode properties: 'options' => [A|C|P|V|D|F|I|L] Add, Change, coPy, View, Delete, Filter, Initial sort suppressed, List List is assumed and technically does not have to be specified. With version 5.4 certain options should be moved to the 'input' option to ensure compatibility with future releases. 'input' => [R|W|H|] Readonly, passWord, Hidden (formerly included in 'options') While highly unlikely, the following field array "could" be defined: $opts['fdd']['col_name'] = array( // Begin array 'colattrs|LF' => 'style=\"color:#ff0000\"', // Apply style to table cell in List/Filter mode 'css' => array('postfix' => 'right-justify'), // MFG: right align numeric cells 'datemask' => date('Y-m-d'), // Apply datemask 'escape|LF' => false, // Suppress htmlspecialchars() which is the default display mode 'help|ACP' => 'Limit 5 chars.', // MFG: column type dependent Help 'input' => 'RWH', // Readonly, passWord, Hidden 'mask|LF' => '%.10s', // Display only the first 10 characters 'maxlen' => 5, // INPUT maxlength, never more than 60, often shortened if the field inludes encrypted passwords 'name' => 'Title', // Column title 'nowrap' => true, // Equivalent to ... 'options' => 'ACPVDFL', // Add, Change, coPy, View, Delete, Filter (search), and List 'required' => true, // Invokes Javascript to enforce user entry 'select' => 'D', // Dropdown, Text, Numeric, Multiple SELECT boxes 'size' => 5, // INPUT size 'sort' => false, // Column title non-sortable/clickable 'sql' => 'TRIM(\"$val_as\")', // trim() 'sqlw' => 'UPPER($val_qas)', // strtoupper() 'strftimemask' => '%c', // strftimemask() 'strip_tags' => true, // strip_tags 'tab' => 'Title', // Text for A HREF tag in TAB's menu 'textarea' => array('rows' => 5, 'cols' => 90), // TEXTAREA size in ACP modes 'trimlen|LF' => 30, // Display the first 30 characters in List/Filter mode 'URL' => '$value', // URL 'URLtarget' => '_blank', // Launch in new window 'URLdisp' => 'GO' // Link text optionally replacing $value }; Convert an integer field whose value resulted from inserting time() to a date using: $opts['fdd']['col_name']['sql'] = 'CONCAT(FROM_UNIXTIME(col_name, \"%a %b %e %Y %h:%i %p\"))'; See documentation section 4.6 URL linking for: 'URLprefix' => 'http://', 'URLpostfix' => '' $opts['fdd']['user_password']['sqlw'] = 'IF(user_pass = $val, $val, MD5($val))'; $val -- value of the field $val_as -- value with addslashes() function applied $val_qas -- same as $val_as with quotes around Storing NULL's: $opts['fdd']['col_name']['sqlw'] = 'IF($val_qas = "", NULL, $val_qas)'; Passwords: $opts['fdd']['col_name']['sqlw'] = 'IF(col_name = $val, $val, MD5($val))';