我有以下问题。我想让它在连接之后过滤掉类型和关系都等于“communicator”的行。我试过了 whereRaw('(type <> communicator and relationship <> communicator')
但我犯了个严重的错误。我怎样才能达到我想要的结果?
关系正在恶化 titles_to_communicators
类型在 communicators
.
$query = \DB::table('titles_to_communicators')
->leftJoin('communicators', 'communicators.id', '=', 'titles_to_communicators.communicator_id')
->where('relationship', '<>', 'character')
->whereIn('title_id', $childIds)
->groupBy('communicators.slug')
->limit(40);
1条答案
按热度按时间sirbozc51#
尝试
其中(type=“communicator”和relation=“communicator”)