Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Oct 31st, 2005, 12: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
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:45 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC