datatables editor select from a table exclude is null

datatables editor select from a table exclude is null

marcdekammarcdekam Posts: 1Questions: 1Answers: 0

Hi,
I want to include a dropdownlist. in this list I want to include values from a table that match a sql expression 'where field IS NULL'
how do I do this.
this is what I have now and is not giving any resuls in the dropdown.
```
Field::inst( 'ea.id' )
->options( Options::inst()
->table( 'reportengine_cfg'.$_SESSION['dblink'].' e' )
->value( 'e.id' )
->label( 'name' )
->where( function ($q) {
$q->where( 'e.parent_id', 'is null' );}
)
),
````
regards Marc

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.