Get ids of rows removed on server side
Get ids of rows removed on server side
I know I can use the postSubmit event to easily get the removed ids of a table but need to access those ids on the server side. I took a look here https://editor.datatables.net/manual/server but could not get the server to replicate the example i see.
lets say i have this:
$data = Editor::inst( $db, 'expenses','expense_id' )
->fields( //add fields)
)->leftJoin()
->leftJoin()
->where( );
//do stuff before we call process()
$out = $data->process($_POST)->data();
if(isset($_POST['action']) && $_POST['action'] === 'remove'){
//removed row_id: $out['expense_id']
}
how is this done?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The ids to be deleted are in
$_POST['id']
which is an array of ids in a remove request.Allan
Thank you I will give it a try.