日期:2014-05-17 浏览次数:20931 次
cplb = request("cplb")
sql = "select * from table where 1 = 1"
if cplb <> "" then
sql = sql & " and cplb = '"&cplb&"'"
end if
sql = sql & " order by id desc"
------解决方案--------------------
"SELECT * FROM Cp_biao WHERE cplb = ?"
这个改下,如下
Dim strSql,strWhere
strWhere = "1=1"
If cplb<>"" Then
strWhere =strWhere &"cplb="&cplb
End If
strSql = strSql&"strWhere"