|
Additional Information / Solution |
Code:
$opts['fdd']['function_id'] = array(
'name' => 'Function ID',
'input' => 'H',
'select' => 'T',
'options' => 'AVCPDR', // auto increment
'maxlen' => 6,
'default' => '0',
'sort' => true
);
$dbfield = "spj";
$dbtable = "Subprojects";
$name = "Subproject";
$opts['fdd'][$dbfield.'_id'] = array(
'name' => $name,
'maxlen' => 6,
'select' => 'D',
'values' => array(
'table' => $dbtable,
'column' => $dbfield.'_id',
// 'description'=> $dbfield.'_name',
'description' => array(
'columns' => array($dbfield.'_code', $dbfield.'_name'),
'divs' => array(' * '),
),
'orderby'=> $dbfield.'_code'),
'sort' => true
);
// scenario_id
$dbfield = "scenario";
$dbtable = "Scenarios";
$name = "Scenario";
$opts['fdd'][$dbfield.'_id'] = array(
'name' => $name,
'maxlen' => 6,
'select' => 'D',
'values' => array(
'table' => $dbtable,
'column' => $dbfield.'_id',
'description'=> $dbfield.'_name',
'orderby'=> $dbfield.'_name'),
'sort' => true
);
// activity_id
$dbfield = "activity";
$dbtable = "Activities";
$name = "Activity";
$opts['fdd'][$dbfield.'_id'] = array(
'name' => $name,
'select' => 'D',
'values' => array(
'table' => $dbtable,
'column' => $dbfield.'_id',
'description' => array(
'columns' => array($dbfield.'_name', $dbfield.'_desc', 'outcome'),
'divs' => array(' = ', '. <b>Outcome expected</b> = '),
),
// 'filters' => $filter,
'orderby'=> $dbfield.'_name'),
'sort' => true
);
$opts['fdd']['item_id'] = array(
'name' => 'Item',
'select' => 'D',
'values' => array(
'table' => 'Items',
'column' => 'item_id',
'description'=> 'item_desc',
// 'filters' => $filter,
'orderby'=> 'item_desc'),
'sort' => true
);
$opts['fdd']['outcome'] = array(
'name' => 'Outcome',
'select' => 'T',
'maxlen' => 200,
'required' => $required,
'sort' => true
);
// Now important call to phpMyEdit
require_once 'extensions/phpMyEdit-report.class.php';
new phpMyEdit_report($opts);
?>
|