asp查询出 红框里 type1 type2 type3 为 1,0,0 的结果....
源码在这里,求修改.....Sql="Select*fromFreeHost.FreeHost_Newswhereusername='"&username&"'and(t...
源码在这里,求修改.....
Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("typeid")<>"" and IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and typeid='"&Request.QueryString("typeid")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("type1")<>"" And (Request.QueryString ("type1")="0" Or Request.QueryString ("type1")="1") and IsNumeric(Request.QueryString("type1")) then Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and type1='"&Request.QueryString("type1")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("type2")<>"" and IsNumeric(Request.QueryString("type2")) then Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and type1=1 and type2='"&Request.QueryString("type2")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc" 展开
Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("typeid")<>"" and IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and typeid='"&Request.QueryString("typeid")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("type1")<>"" And (Request.QueryString ("type1")="0" Or Request.QueryString ("type1")="1") and IsNumeric(Request.QueryString("type1")) then Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and type1='"&Request.QueryString("type1")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("type2")<>"" and IsNumeric(Request.QueryString("type2")) then Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and type1=1 and type2='"&Request.QueryString("type2")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc" 展开
展开全部
Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
按照你红框画出的记录应该用and判断而不是or,修改如下
Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and (type1=1 and type2=0 and type3=0) order by orderbyid desc,id desc"应该这样才对吧???
按照你红框画出的记录应该用and判断而不是or,修改如下
Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and (type1=1 and type2=0 and type3=0) order by orderbyid desc,id desc"应该这样才对吧???
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询