关于SQL高级查询~
if request("btype_id")<>"" then sql=sql&" btype_id="+request("btype_id")+" and"
if request("stype_id")<>"" then sql=sql&" stype_id="+request("stype_id")+" and" 'if request("tname")<>"" then sql=sql&" tname='"+request("tname")+"' " if right(sql,5)="where" then sql=left(sql,clng(len(sql))-3)'解决所有参数为空 if right(sql,3)="and" then sql=left(sql,clng(len(sql))-3) '去掉参数的and sql=sql&" order by productid desc" |
关于SQL高级查询
最新推荐文章于 2024-10-09 09:43:29 发布