我的选择查询有问题。我有 4 个条件来检查这个查询。
$subject // This condition is always true that mean it has a value when executing the query
$option // This condition is also true that mean it has a value when executing the query
$district // Maybe this is true or not
$city // Maybe this is true or not
现在我需要使用这 4 个条件进行选择查询。
我能知道有没有办法将这 4 个条件添加到我的 WHERE 子句中,然后检查哪些是真或假,然后根据查询满足的条件返回记录。
希望有人能帮助我。
谢谢你。