PHP 接收筛选项包含0的select下拉菜单的处理

这种情况下,PHP的判断方法如下:
$where = "1=1"; if ($get['status'] !== '' && $get['status'] !== false) { $where .= " AND status='{$get['status']}'"; }

这种情况下,PHP的判断方法如下:
$where = "1=1"; if ($get['status'] !== '' && $get['status'] !== false) { $where .= " AND status='{$get['status']}'"; }