Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Problem in searching multiple keywords(database)

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,58711
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Problem in searching multiple keywords(database)
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Problem in searching multiple keywords(database) - 4/2/2008 8:12:42 PM   
  kumiko

 

Posts: 2
Score: 0
Joined: 4/2/2008
Status: offline
  #1  


04-03-2008, 04:10 AM









kumiko
vbmenu_register("postmenu_13694", true);



Registered User






Join Date: Jul 2006


Posts: 1





Problem in searching multiple keywords match with multiple field in database











hi, good day.
i have some problem in doing the searching multiple keywords function.

in my layout i have a textbox,user can insert many keywords with the comma separator between each keywords. and then the search function will go to search 3 field in table A, let say field 1 ,field 2 and field 3 see whether got match the keywords or not.
table A
ID |field 1 | field 2 | field 3
----------------------------------------------------------------------------
1 |air conditioner |air conditioner,free| air conditioner
2 | chair | chair,furniture | chair,furniture
3 | hair | hair,human,body | hair,human,body
4 | dog | animal,dog | animal,dog
5 | cat | animal,cat | animal,cat


ok. let say i insert keywords such as --> " AIR,DOG,Animal " in the textbox and search it.
so based on the records from my table. it should query out the records : which ID = 1,4,5(Air Conditioner,Dog and cat)
it should not display the result for Chair OR hair even these two words combine with AIR tis word (Ch +Air) & (H +Air).
the record Cat will show out becoz in the field 2 the "Animal" keywords is matched. therefore it will show out.

so the final result it will display Air conditioner, dog and cat

do u all get wat i mean?
i hope can get some response from u all soon. i need some help on coding.plz help.thanx alot.
p/s: i m using asp +MS SQL SERVER 2005




< Message edited by kumiko -- 4/2/2008 8:45:09 PM >
 
 
Post #: 1
 
 RE: Problem in searching multiple keywords(database) - 4/3/2008 12:38:53 AM   
  ebgreen


Posts: 4411
Score: 29
Joined: 7/12/2005
Status: offline
What is your code for the search right now?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to kumiko)
 
 
Post #: 2
 
 RE: Problem in searching multiple keywords(database) - 4/3/2008 1:55:22 AM   
  kumiko

 

Posts: 2
Score: 0
Joined: 4/2/2008
Status: offline
<%


%>

above is my current searching code. plz help more.thank you
i really need more help frm u alll..urgent..plz give me a hand..thank you

< Message edited by kumiko -- 4/7/2008 8:52:04 PM >

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Problem in searching multiple keywords(database) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts