<%
searchPlace=Replace_Text(request("searchPlace"))
keywords=Replace_Text(request("keywords"))
set rs=server.createobject("adodb.recordset")
sql="select * from help"
if keywords>"" then
if searchPlace=1 then
sql=sql&" where showname like '%"&keywords&"%'"
end if
if searchPlace=2 then
sql=sql&" where content like '%"&keywords&"%'"
end if
else
if typeid>"" then
sql=sql&" where typeid="&typeid&""
else
sql=sql&" where typeid=1"
end if
end if
sql=sql&" order by -ID desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
|