taskid tasktitle assigned to
1 A DEMO
2 B TEST
3 C DEMO,TEST
$caccess= $user->authorise('core.admin');
if( !$caccess ) {
$query->where('task.assignedto='.$user->id);
}
我将上面的代码放在ListQuery
模型中的函数中,但只task A
用于DEMO USER
.
我需要TASK A
and和TASK C
for 。_ 在数据库中,分配的字段存储为 for 。DEMO USER
TASK B
TASK C
TEST USER
demo,test
TASK C
我应该如何编写检索查询?