我的查询有点问题。我需要选择任何可能的组合...我正在尝试通过查询在 db 中搜索
"SELECT * FROM `events` WHERE
`start_time` >= '{$current_time}' AND
`start_time` >= '{$limit_from}' AND
`end_time` <= '{$limit_to}' AND
`filter_large` = '{$filter_large}'"
它给了我 3 个结果和第二个
"SELECT * FROM `events` WHERE
`start_time` >= '{$current_time}' AND
`start_time` >= '{$limit_from}' AND
`end_time` <= '{$limit_to}' AND
`filter_education` = '{$filter_education}'"
给了我 4 个结果,但我想像这样一起查询它们..
"SELECT * FROM `events` WHERE
(
`start_time` >= '{$current_time}' AND
`start_time` >= '{$limit_from}' AND
`end_time` <= '{$limit_to}' AND
`filter_education` = '{$filter_education}'
) OR (
`start_time` >= '{$current_time}' AND
`start_time` >= '{$limit_from}' AND
`end_time` <= '{$limit_to}' AND
`filter_large` = '{$filter_large}'
)
它只给我 4 个结果而不是 7 个。我做错了什么?