有没有高手能解决这个问提,多字段查询搜索全部内容
这是一个搜索列表代码,没有条件能搜索出所有的数据,采购单位全部搜索显示为:北京,上海,武汉,天津等等。我只要搜索出纵向采购单位为武汉的所有数据(包括编号,帐号,姓名,联系,电话电子邮件,采购单位,采购物品,确认方式)横向全部内容
,如何修改,请高手解答。在线等。
<html>
<head>
<title> 企业采购信息管理 </title>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<link rel= "stylesheet " href= "system/style.css " type= "text/css "> </head>
<body>
<br>
<%
set rs=server.createobject( "adodb.recordset ")
sqltext= "select * from orderb where 1=1 order by id desc "
rs.open sqltext,conn,1,1
If rs.eof and rs.bof then
call showempty
Else
call list
End if
Sub list()%>
<table width= "95% " border=1 align= "center " cellPadding=0 cellSpacing=0 bordercolor= "#999999 " borderColorDark=#ffffff bgcolor= "#F9F9F9 ">
<tr class=main2>
<td width= "5% " height= "25 " align= "center " background= "Images/topBar_bg.gif "> 编号 </td>
<td width= "9% " align= "center " background= "Images/topBar_bg.gif "> 帐号 </td>
<td width= "7% " align= "center " background= "Images/topBar_bg.gif "> 姓名 </td>
<td width= "15% " align= "center " background= "Images/topBar_bg.gif "> 联系电话 </td>
<td width= "15% " align= "center " background= "Images/topBar_bg.gif "> 电子邮件 </td>
<td width= "17% " align= "center " background= "Images/topBar_bg.gif "> 采购单位 </td>
<td width= "11% " align= "center " background= "Images/topBar_bg.gif "> 采购物品 </td>
<td width= "9% " align= "center " background= "Images/topBar_bg.gif "> 确认方式 </td>
</tr>
<%
if not rs.eof then
do while not rs.eof
%>
<tr>
<td width= "5% " align= "center " height= "23 "> <%=rs( "id ")%> </td>
<td width= "9% " align= "center " height= "23 "> <%=rs( "userid ")%> </td>
<td width= "7% " align= "center " height= "23 "> <%=rs( "username ")%> </td>
<td width= "15% " align= "center " height= "23 "> <p align= "left "> <%=rs( "mobiletel ")%> </td>
<td width= "15% " align= "center " height= "23 ">
<p align= "left "> <%=rs( "email ")%> </td>
<td width= "17% " align= "center " height= "23 ">
<p align= "left "> <%=GetHotelName(rs( "c_id "))%> </td>
<td width= "11% " align= "center " height= "23 ">
<p align= "left "> <%=GetRoomName(rs( "roomtype "))%> </td>
<td width= "9% " height= "23 "> <%=rs( "affirmtype ")%> </td>
</tr>
<%
rs.movenext
loop
End If
rs.close
conn.close
End sub
%>
</table>
<%
'显示空帖子的子程序
Sub showempty()%>
<table width= "95% " border=1 align= "center " cellPadding=0 cellSpacing=0 bordercolor= "#999999 " borderColorDark=#ffffff bgcolor= "#F9F9F9 " height= "230 ">
<tr class=main2>
<td width= "5% " height= "23 " align= "center " background= "Images/topBar_bg.gif "> 编号 </td>
<td width= "9% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 帐号 </td>
<td width= "7% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 姓名 </td>
<td width= "15% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 联系电话 </td>
<td width= "15% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 电子邮件 </td>
<td width= "17% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 采购单位 </td>
<td width= "11% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 预定房型 </td>
<td width= "9% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 确认方式 </td>
<td width= "12% " align= "center " background= "Images/topBar_bg.gif " height= "23 "> 操作 </td>
</tr>
<tr class=main2>
<td align= "center " height= "203 " colspan= "9 "> 无相关信息! </td>
</tr>
</table>
<%
End sub
%>
</body>
</html>
------解决方案--------------------
sqltext= "select * from orderb where c_id=? order by id desc "
// ?号是你代表武汉的id