billsaysthis
Založený: 20.05.2004
Príspevky: 5
Zaslal: 2004-06-09 21:46
Návrat hore
Odpovedať s citátom
|
If I use the values[] option to set up the input as a dropdown list linked to a table, there is no way I can see to specify the value as NULL even if the field is defined to allow nulls in the database. Can anyone suggest a way to handle this? The field as I have now is:
$opts['fdd']['ParentID'] = array(
'name' => 'Parent ID',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'values'=>array('table'=>'products', 'column'=>'ProductID', 'description'=>'PartNumber'),
'sort' => true
);
|
daniele
Založený: 27.08.2003
Príspevky: 2
Zaslal: 2004-06-10 09:04
Návrat hore
Odpovedať s citátom
|
I think you can try this:
$opts['fdd']['ParentID']['values2'] = array(''=>'');
$opts['fdd']['ParentID']['sqlw'] = 'if(\'$val\' = \'\',NULL,\'$val\')';
should work.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|