首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 冲浪宝典 > 网络资源 > 多条件查询语句
【标  题】:多条件查询语句
【关键字】:
【来  源】:http://blog.csdn.net/guzhaohui/archive/2006/10/13/1333795.aspx

多条件查询语句

'selectid=request.form("select")

sql="select * from bazhu Where xz='出 售' or xz='求 购' "

 

if city<>"" then

    sql=sql&"And city like '%"&city&"%' "

End if

if house_type<>"" then

    sql=sql&"And house_type like '%"&house_type&"%' "

End if

if price_beg<>"" then

    sql=sql&"And price_beg like '%"&price_beg&"%' "

End if

if price_end<>"" then

    sql=sql&"And price_end like '%"&price_end&"%' "

End if

if living_room<>"" then

    sql=sql&"And living_room like '%"&living_room&"%' "

End if

if sitting_room<>"" then

    sql=sql&"And sitting_room like'%"&sitting_room&"%' "

End if

if toilet<>"" then

    sql=sql&"And toilet like'%"&toilet&"%' "

End if

 

 

 

 

sql=sql & "order by id desc"

set rs=server.createobject("ADODB.recordset")

 

'sql="select * from bazhu where xz='出 售' or xz='求 购'"

rs.open sql,conn,1,1

'end if

if rs.eof or rs.bof then

response.write "对不起,没有查询到您需要的内容!"

response.end

end if

rs.pagesize=20

if request.querystring("page")="" then

    rs.absolutepage=1

else

    rs.absolutepage=request.querystring("page")

end if

%>

 

 

ORACLE STATSPACK REPORT输出结果解释:【上一篇】
oracle入门sql语句:【下一篇】
【相关文章】
没有相关文章
【随机文章】
  • 完整的FreeBSD安装手册
  • Enterprise Library 2.0 -- Logging Application Block (上)
  • 与服务器进行异步通信---Xjax
  • 永远的华健,永远的歌……
  • IP Filter Based Firewalls HOWTO(8)
  • Dlinq Overview 1
  • “让技术改变世界”,更要用技术打造中国的国际化!-写过园子里面一些类似Nbear的团队和一切承认自己是中国...
  • 谁动了我的Offer
  • c++入门学习笔记指针篇
  • 刚开张
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.