asp多条件查询sql语句用法,可用于搜索、筛选模块
分类:程序开发 Tags: asp 评论:0 浏览:2416 最近更新时间:2006/12/2 20:15:18
多条件查询sql语句用法,比较不错的多条件查询asp代码写法,很实用,也很简洁。
- big_id=trim(request("big_id"))
- small_id=trim(request("small_id"))
- key=trim(request("key"))
- yongtu=trim(request("yongtu"))
- chudian=trim(request("chudian"))
- dianliu=trim(request("dianliu"))
- dianya=trim(request("dianya"))
- Set Rs=Server.CreateObject("ADODB.Recordset")
- sql="select * from yuzhiguo_products where 1=1"
- if big_id<>"" then sql=sql&" and big_id="&big_id&""
- if small_id<>"" then sql=sql&" and small_id="&small_id&""
- if yongtu<>"" then sql=sql&" and yongtu="&yongtu&""
- if chudian<>"" then sql=sql&" and chudian="&chudian&""
- if dianliu<>"" then sql=sql&" and dianliu="&dianliu&""
- if dianya<>"" then sql=sql&" and dianya="&dianya&""
- if key<>"" then sql=sql&" and ( e_cpmc like '%"&key&"%') "
- sql=sql&" order by "&paixu&" desc,id desc"
本文地址:/93/
-
• asp使用CDO.Message发送邮件详细代码集合
• fckeditor报错FCKLang undefined(fcklang未定义)的解决方法
• Asp超精准判断客户端操作系统类型代码
• Asp超精准判断客户端浏览器类型代码
• windows 2003通过squid搭建cdn节点加速服务
• IE6中使用first-letter首字符css的特殊写法
• 解决IE6下float浮动margin出现双倍距离问题
• ASP实现点击链接直接下载文件的代码
• ASP在线创建ACCESS表或添加字段代码
• asp如何读取txt文本内容代码