billsaysthis
Joined: 20 May 2004
Posts: 5
Posted: 2004-06-09 21:46
Back to top
Reply with quote
|
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
Joined: 27 Aug 2003
Posts: 2
Posted: 2004-06-10 09:04
Back to top
Reply with quote
|
I think you can try this:
$opts['fdd']['ParentID']['values2'] = array(''=>'');
$opts['fdd']['ParentID']['sqlw'] = 'if(\'$val\' = \'\',NULL,\'$val\')';
should work.
|
|
Post new topic
Reply to topic
|
|
|