R
redant via AccessMonster.com
I created a keyword search in Dreamweaver that searches the title only of a
list of courses. I can type in an exact phrase or part of a word and that
works good. Now I have to be able to type in two non adjacent words that may
be in a course title. ANy idea on how to get started or where? Thank you.
<%
Dim rsKeySearchCourses__MMColParam
rsKeySearchCourses__MMColParam = "1"
If (Request.QueryString("txtKeywords") <> "") Then
rsKeySearchCourses__MMColParam = Request.QueryString("txtKeywords")
End If
%>
<%
Dim rsKeySearchCourses
Dim rsKeySearchCourses_cmd
Dim rsKeySearchCourses_numRows
Set rsKeySearchCourses_cmd = Server.CreateObject ("ADODB.Command")
rsKeySearchCourses_cmd.ActiveConnection = MM_cnnTrainingWebsite_STRING
rsKeySearchCourses_cmd.CommandText = "SELECT * FROM AllCourses WHERE Title
LIKE ? ORDER BY Title ASC"
rsKeySearchCourses_cmd.Prepared = true
rsKeySearchCourses_cmd.Parameters.Append rsKeySearchCourses_cmd.
CreateParameter("param1", 200, 1, 255, "%" + rsKeySearchCourses__MMColParam +
"%") ' adVarChar
Set rsKeySearchCourses = rsKeySearchCourses_cmd.Execute
rsKeySearchCourses_numRows = 0
%>
list of courses. I can type in an exact phrase or part of a word and that
works good. Now I have to be able to type in two non adjacent words that may
be in a course title. ANy idea on how to get started or where? Thank you.
<%
Dim rsKeySearchCourses__MMColParam
rsKeySearchCourses__MMColParam = "1"
If (Request.QueryString("txtKeywords") <> "") Then
rsKeySearchCourses__MMColParam = Request.QueryString("txtKeywords")
End If
%>
<%
Dim rsKeySearchCourses
Dim rsKeySearchCourses_cmd
Dim rsKeySearchCourses_numRows
Set rsKeySearchCourses_cmd = Server.CreateObject ("ADODB.Command")
rsKeySearchCourses_cmd.ActiveConnection = MM_cnnTrainingWebsite_STRING
rsKeySearchCourses_cmd.CommandText = "SELECT * FROM AllCourses WHERE Title
LIKE ? ORDER BY Title ASC"
rsKeySearchCourses_cmd.Prepared = true
rsKeySearchCourses_cmd.Parameters.Append rsKeySearchCourses_cmd.
CreateParameter("param1", 200, 1, 255, "%" + rsKeySearchCourses__MMColParam +
"%") ' adVarChar
Set rsKeySearchCourses = rsKeySearchCourses_cmd.Execute
rsKeySearchCourses_numRows = 0
%>