OR条件怎么使用IN子查询
目标sql是
SELECT
`fld_ID` AS `id`,
`fld_name` AS `name`
FROM
`channels`
WHERE
(`fld_status` = 1)
AND (
`fld_parent` = 3
OR `fld_parent` IN (
SELECT
`fld_ID`
FROM
`channel_class`
WHERE
(`fld_parent` = 3)
)
)
怎么使用构建器啊,其中两表fld_parent值是变量?拼不出来了,求助
1 Comment
用orWhere包装一下就好了。