asp 判断现实问题

[复制链接]
查看11 | 回复1 | 2009-3-26 16:48:53 | 显示全部楼层 |阅读模式
"" and ziduan "" then
sql="select * from ty where "&ziduan&" like '%"&key&"%' order by id desc"
end if
if ziduan"" and sex"" and bumen"" then
sql="select * from ty where "&ziduan&" like '%"&key&"%' "
end if
if key=""then
sql="select * from ty order by ID desc"
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write"没有记录"
response.end
end if
rs.PageSize=20
pagecount=rs.PageCount
page=int(request.QueryString ("page"))
if page
想在页面里现实 一车间 男或一车间 在职
bumen=一车间zaizhi=在职 sex=男
部门
bumen=一车间
在职
zaizhi=在职
性别
sex=男
if key"" and ziduan "" then
sql="select * from ty where "&ziduan&" like '%"&key&"%' order by id desc"
end if
这里怎么修改呀 ?

回复

使用道具 举报

千问 | 2009-3-26 16:48:53 | 显示全部楼层
是where问?select * from table where bumen='一车间' and zaizhi='在职' and sex='男'??...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行