<%
dim pname
pname=request("search1")
If Trim(pname)="" Then
Response.Write"<script>alert('Input Character');history.go(-1);</script>"
Response.End()
End If
Set Rs=Server.CreateObject("Adodb.Recordset")
Str=Split(pname,",")
For i=0 to Ubound(Str)
StrTemp=Str(i)
Sql=Sql&" or proname like '%"&StrTemp&"%'"
Next
sql="Select * From mbcomp Where proname like '%"&Str(0)&"%'"&Sql&""
if not (rs.eof and rs.bof) then
Rs.Open sql,dbconn,1,1
Response.write"<table width='760' border='0' cellspacing='1' cellpadding='2' class='tbbgcolor'>"
Response.write"<tr >"
Response.write"<td class='trbgcolor_1'>Product Name</td>"
Do while not Rs.eof
Response.write" <tr>"
Response.write" <td class='trbgcolor_2'><a href='motherboard_view.asp?productid="&Rs("proid")&"'>"&Rs("proname")&"</a></td>"
Response.write" <td><font color='#ff0000'>查询到记录</font></td></tr>"
Rs.movenext
loop
Rs.movefirst
Response.write"</table>"
end if
Rs.close : Set Rs=Nothing
%>