Search code examples
codeignitergrocery-crud

Get rows where field equal value in grocery crud


$crud->set_table('pages',"where permission =1"); <----------------------how to do this in the right way 
$crud->set_relation('pagetype','themes','name'); 
$crud->set_rules('systemTTL', 'System Title', 'trim|required|min_length[4]|xss_clean|alpha_dash'); 
$crud->callback_add_field('title',array($this,'edit_field_callback'));

Hellooo I have multiple users with permissions and i want to show only raws which are for certain user group ....

Thank you


Solution

  • Use the where method:

    $crud->where('permission', 1);
    

    Edit: Here is the documentation.