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 Aand和TASK Cfor 。_ 在数据库中,分配的字段存储为 for 。DEMO USERTASK BTASK CTEST USERdemo,testTASK C
我应该如何编写检索查询?