Id row is Null when Deleted

Paste your code here.

I don't know if you just had it like that for testing, but you just need to do whatever processing you need to do inside the loop.

-- hugh
 
foreach($data[0][0] as $row){
$x = $row->table___id_raw;
}
$rowid = $x;
I use this code to get row id for additional sql queries in real application, not only for test. This video only illustrated the problem.


Sent from my LG-H320 using Tapatalk
 
OK, well that code will only set the $rowid for the last selection. You need to do your processing inside the loop.

Code:
foreach($data[0] as $group)
{
   foreach ($group as $row)
   {
      $rowid = $row->table___id_raw;
      // your row processing goes here
   }
}

You also need that nested foreach, as the selected rows could be split across groups, if the list is grouped.

Alternatively you could get the ids directly from the input ...

Code:
$ids = $this->model->app->input->get('ids', array(), 'array');
foreach ($ids as $rowid) {
   // your row processing goes here
}

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top