View Single Post
Old Oct 31st, 2005, 1:48 AM   #1
raikkonen
Newbie
 
Join Date: Jun 2005
Posts: 29
Rep Power: 0 raikkonen is on a distinguished road
Exclamation Search using a few keywords

Hi all, how do i search my database using a few keywords? Say instead of the usual one keyword search,i want to search say 'cat,dog,mouse' instead of maybe 'cat' only. How do i do it? I understand there is a split function but how does it work?

at the moment i have these codes. I have 4 textboxes of inputting the keywords that will lead to the article. then i join them into one field name called 'keywords' inside my database.

strKeyword1=Request("keyword1")
strKeyword2=Request("keyword2")
strKeyword3=Request("keyword3")
strKeyword4=Request("keyword4")
strKeywords=strKeyword1&","&strKeyword2&","&strKeyword3&","&strKeyword4

searchkeyword=Request.QueryString("keywords")
sql="Select * from news where keywords='"&searchkeyword&"'"
multiplekeywords=split(sql,"")
RS.Open sql,Conn,3,3


i figure the problem is from the serachkeyword onwards. I can't get the logic of it - someone pls helpp !!!!!!
raikkonen is offline   Reply With Quote