Get ids of rows removed on server side

Get ids of rows removed on server side

INTONEINTONE Posts: 153Questions: 58Answers: 6
edited November 2014 in Editor

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

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    The ids to be deleted are in $_POST['id'] which is an array of ids in a remove request.

    Allan

  • INTONEINTONE Posts: 153Questions: 58Answers: 6

    Thank you I will give it a try.

This discussion has been closed.