phpMyEdit Lookups
Examples for looking up data residing in a different table appear below. If the name of the primary key column is the same in both tables, the following examples will not work (JOIN is required and examples are not currently available).
$opts['fdd']['col_name'] = array(
'default' => 'default',
'maxlen' => 10,
'name' => 'Title',
'select' => 'T',
'sort' => true,
'values' => array(
'table' => 'other_table',
'column' => 'col_name2',
'description'=> 'name',
'orderby' => 'name'
)
);
$opts['fdd']['col_name'] = array(
'default' => 'default',
'maxlen' => 10,
'name' => 'Title',
'select' => 'T',
'sort' => true,
'values' => array(
'table' => 'other_table',
'column' => 'col_name2',
'description'=> array(
'columns' => array('0' => 'name', '1' => 'father_name', '2' => 'mother_name'),
'divs' => array('0' => ' - ', '1' => ' - '),
),
'orderby'=>'name'
)
);
$opts['fdd']['active'] = array(
'default' => '3',
'maxlen' => 4,
'name' => 'Active/Passive',
'required' => true,
'select' => 'D',
'sort' => true,
'values' => array(
'table' => 'tbl_labels',
'column' => 'label_id',
'description' => 'label_name',
'filters' => 'label_group = "2" ')
);
PHP Form Generator Home
| PHP Form Generator Demo
|