Can I add an AND on the select?
Can I add an AND on the select?
Helpdesk Lionesa
Posts: 23Questions: 4Answers: 1
in Editor
How can I add an AND to the select?
$carg_hor = $db
->select( 'select_gestcol_tab_salarial', ['select_carg_hor_id as value', 'select_carg_hor_id as label'], ['select_categoria_id' => $_REQUEST['values']['gestcol_tab_salarial.select_categoria_id'] ] )
->fetchAll();
echo json_encode( [
'options' => [
'gestcol_tab_salarial.select_carg_hor_id' => $carg_hor
]
] );
I tried something like this
>select( 'select_gestcol_tab_salarial', ['select_carg_hor_id as value', 'select_carg_hor_id as label'], ['select_categoria_id' => $_REQUEST['values']['gestcol_tab_salarial.select_categoria_id']
AND $_REQUEST['values']['gestcol_tab_salarial.select_carg_hor_id'] ] )
but it doesn't work
This question has an accepted answers - jump to answer
Answers
Since I know SQL I don't like using the Editor "pseudo" code SQL. If you share that view you can use Editor's "raw" method. This allows you to use Editor's db handler. Alternatively you can use your own db handler of course.
These are examples using Editor's "raw" method with Editor's db handler
Adding just the "," worked.
https://editor.datatables.net/docs/current/php/class-DataTables.Database