各位大神,如何定义一个值,能把(按入库发票1)和(按入库发票2)的查询合并成(按入库发票) 查询?

Gycyymq 2017-11-04 02:43:35
<form name="form" method="post" action="index_sp.asp">
输入查询关键字:<td width="198" align="center">
<input name="keyword" size="27" style="border: 1px solid #008000; background-color:#FFFFCC; float:left" value="<%=keyword%>"></td>
<td width="109">
<select name="field" size="1" style="border: 1px solid #008000; background-color: #FFFFCC">
<option selected value="name" <% if field="name" then response.write"selected" end if %>>按商品名称</option>
<option value="ggxh" <% if field="ggxh" then response.write"selected" end if %>>按规格型号</option>
<option value="rkfp1" <% if field="rkfp1" then response.write"selected" end if %>>按入库发票1</option>
<option value="rkfp2" <% if field="rkfp2" then response.write"selected" end if %>>按入库发票2</option>

<option value="Ckfp1" <% if field="Ckfp1" then response.write"selected" end if %>>按出库发票1</option>
<option value="Ckfp2" <% if field="Ckfp2" then response.write"selected" end if %>>按出库发票2</option>
<option value="rkdh1" <% if field="rkdh1" then response.write"selected" end if %>>按入库单号1</option>
<option value="rkdh2" <% if field="rkdh2" then response.write"selected" end if %>>按入库单号2</option>
<option value="Ckdh1" <% if field="Ckdh1" then response.write"selected" end if %>>按出库单号1</option>
<option value="Ckdh2" <% if field="Ckdh2" then response.write"selected" end if %>>按出库单号2</option>
</select></td>
<td width="93">
<input type="submit" value="点击查询" name="B1" onClick="return keyword();" style="color: #FF0000; border: 1px solid #008000; background-color:#00CC66"></td>
</form>
===============================================================================
各位大神,如何定义一个值,能把(按入库发票1)和(按入库发票2)的查询合并成(按入库发票) 查询?谢谢!
...全文
189 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Go 旅城通票 2017-11-05
  • 打赏
  • 举报
回复
你弄一个不就行了,然后后台判断是这个就加上这2个条件 <option value="rkfp" <% if field="rkfp1" then response.write"selected" end if %>>按入库发票</option>

field=request("field")
if field="rkfp" then
  sql=sql&" and (rkfp1='xxxxx' or rkfp2='xxxxx')"
end if


Web开发学习资料推荐
asp网站使用utf-8编码注意事项
JSONP跨域访问在线代理

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧