Jump to content


Get rows where field = "X".

field Where

  • Please log in to reply
1 reply to this topic

#1 Ahmad Zein

Ahmad Zein

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 28 October 2014 - 09:06 AM

hello, 

 

am trying to accomplish the following :

 

get only rows where permission = 1 ,

 

i have multiple users and i want to show only certain rows for each user  where they can edit.

 

something like that :

$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'));

Thank you 



#2 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 29 October 2014 - 06:40 AM

well.. the same is already clearly mentioned in the GC documentation,

 

the same can be achieved by using $crud->where("permission", 1);

 

Happy GCing :)







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users