Php If/else If/else带有对数据库的查询,结果为false。
我有一个选择框,其中有一个“全部”选项,然后是一个用户列表 我正在努力创造这样的东西。除了试图查询数据库以检查变量是否在数据库中之外,我拥有大部分功能Php If/else If/else带有对数据库的查询,结果为false。,php,mysql,if-statement,Php,Mysql,If Statement,我有一个选择框,其中有一个“全部”选项,然后是一个用户列表 我正在努力创造这样的东西。除了试图查询数据库以检查变量是否在数据库中之外,我拥有大部分功能 if ($variable == 'All') { code here } else if ($variable != 'ALL' != *[result in database]*) { code here } else { code here } 除了试图查询数据库以检查变量是否在数据库中之外,我拥有大部分功能
if ($variable == 'All') { code here }
else if ($variable != 'ALL' != *[result in database]*) { code here }
else { code here }
除了试图查询数据库以检查变量是否在数据库中之外,我拥有大部分功能
if ($variable == 'All') { code here }
else if ($variable != 'ALL' != *[result in database]*) { code here }
else { code here }
任何关于如何在if语句中合并mySQL数据库查询的建议
谢谢你不能那样使用运算符 替换:
else if ($variable != 'ALL' != *[result in database]*) { code here }
与:
你不能用那样的运算符 替换:
else if ($variable != 'ALL' != *[result in database]*) { code here }
与:
如果您的
$variable!='如果您的$variable!='所有“