solution > use a where like the following example

>> in the controller file under application/controllers/yourfile.php:

public function index()
{
$crud = new grocery_CRUD();
$crud->set_theme('tablestrap');
$crud->set_table('macs');
$crud->display_as('firstseen','Firstseen');
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();
#$crud->field_type('firstseen','datetime');
#$crud->field_type('lastseen','datetime');
$crud->callback_column('firstseen', array($this, 'callback_date'));
$crud->callback_column('lastseen', array($this, 'callback_date'));
#$crud->where([' NOW() - lastseen < ' => ' 100000 ' ]);
$crud->where([' NOW() - lastseen < ' => ' 25920000 ' ]); #30 tage
$output = $crud->render();
$this->load->view('proMAC.php',$output);
}

computer2know :: thank you for your visit :: have a nice day :: © 2024