简体   繁体   English

在杂货杂货中获取字段值相等的行

[英]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 谢谢

Use the where method: 使用where方法:

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

Edit: Here is the documentation. 编辑: 是文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM