The full-text retrieval program that has just been written for a software application

Source: Internet
Author: User
<P> <! -- # Include file = function/conn. asp -->
<Br>
<%
KeyWord = trim (request ("oKey "))
SType = trim (request ("oType "))
If keyWord = "" or keyWord = "keyWord... "Then
Response. Write "enter a keyword! "
Response. End ()
End if
If sType = "" then
Response. Write "select query information category"
Response. End ()
End if
Dim ftsTable 'name of the table to be queried
Dim ftsFolder 'Storage folder for information query
If sType = "1" then
FtsTable = "tb_bzxx"
FtsFolder = fjroot
Elseif sType = "2" then
FtsTable = "tb_other"
FtsFolder = fjroot_other
Elseif sType = "3" then
FtsTable = "tb_info"
FtsFolder = fjroot_info
Else
Response. Write "error! "
Response. End
End if
SQL = ""
If sType = "1" then
SQL = "select bz_xuhao as xuhao, bz_name as bname, bz_code as bcode, bz_htm as htm from" & ftsTable
Elseif sType = "2" then
SQL = "select p_xuhao as xuhao, p_name as bname, p_code as bcode, p_htm as htm from" & ftsTable
Elseif sType = "3" then
SQL = "select info_id as xuhao, info_htm, info_type as htm from" & ftsTable
Else
Response. Write "error! "
Response. End
End if
Call OPenConn () 'to open the database connection
Set fso = server. CreateObject ("scripting. filesystemobject ")
Set rs = server. createobject ("adodb. recordset ")
Dim oPattern
OPattern = "<p> | <p (. *) >|</p>"
'If the third type of information is queried (other information), all information categories are first retrieved and put into the array.
Dim infoType ()
If sType = "3" then
Rs. Open "select type_id, type_name from tb_info_type order by type_id desc", adocon, 3,1
If rs. RecordCount <= 0 then
CloseRs rs
Call CloseConn
Response. Write "error! "
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.