asp搜索引擎的制作

来源:百度知道 编辑:UC知道 时间:2024/05/31 04:58:52
偶想用写ASP搜索引擎,数据文件是.MDB格式的.数据库名字是#DB1.ASP
数据库里有几张表,偶想调用news表.表里有几个小表,有id(定义为编号)、title(文章具体标题)、content(文章具体内容)、time(发布文章的时间)、hit(点击次数)叙述完毕。
偶想做个搜索引擎,搜索引擎包含几种搜索功能,其中包括按时间搜索、按具体内容搜索、按标题搜索、按点击次数搜索。
俺已经发好几条信息了,希望有能力的大哥给俺详细说说,或者将具体的代码告诉俺。别只说一章半节的。

搜索引擎包含几种搜索功能...........

这样是叫几种吗??

表单文件
一个文本框text(Name=Key)
一个select(Name=KeyClass) 其中包括
值 内容
1 按具体内容
2 按时间
3 按标题
4 按点击次数

搜索文件
<%
.........打开数据库 conn
.........建立对像 rs

dim Key,KeyClass
Key=request.Form("Key")
KeyClass=request.Form("KeyClass")

If KeyClass=1 then
sql="select *from news where content like '%"&Key&"%'"
ElseIf Keyclass=2 then
sql="select *from news where time='"&Key&"'"
ElseIf Keyclass=3 then
sql="select *from news where title like '%"&Key&"%'"
ElseIf Keyclass=4 then
sql="select *from news where hit="&Key
End if

rs.open sql,conn,1,3
..........输出

%>

根据传递过来的参数决定查询SQL语句,
SearchType
值 说明
1 按