我有以下代码:
switch ((int)$_GET["loanprovider"]) {
case ((int)$_GET["loanprovider"] > 1):
$sql_loanprovider1a = " l.id in (select la.loanid from loan_approvals la where la.bankid = ".$_GET["loanprovider"].") and";
$sql_loanprovider1b = " l.loanid in (select la.loanid from loan_approvals la where la.bankid = ".$_GET["loanprovider"].") and";
break;
default:
break;
}
如果我在 URL 中未设置 LOANPROVIDER 的情况下运行该页面,则 SWITCH 仍会输入第一种情况,而不是默认值。怎么会??
/鲍勃