if Session("UserName") = "user" or Session("UserName") ="admin" then
sql ="Select * From bzglsw where jsc<>'2' order by id desc"
else if sql_where="" then
sql ="Select * From bzglsw where jsc<>'2' order by id desc"
else
sql ="Select * From bzglsw "&sql_where&" and jsc<>'2' order by id desc"
end if
sql ="Select * From bzglsw where jsc<>'2'and userid= '"&Session("UserID")&"' order by id desc"
end if
不能实现中间的要求if sql_where="" then
sql ="Select * From bzglsw where jsc<>'2' order by id desc"
else
sql ="Select * From bzglsw "&sql_where&" and jsc<>'2' order by id desc"
end if
如果把 中间那个end if 放到最后也就是二个END IF在一起就不能实现 sql ="Select * From bzglsw where jsc<>'2'and userid= '"&Session("UserID")&"' order by id desc"
请问如何写
谢谢各位 请指教 语句无错误只需告诉我如何同时实现2个功能就可以了
条件语句嵌套请教