Search function, one textbox
From: Angela (anon_at_email.com)
Date: 11/09/04
- Next message: L Gonzales: "Decrypt"
- Previous message: L Gonzales: "Re: Encrypted Stored Proc"
- Next in thread: Alejandro Mesa: "RE: Search function, one textbox"
- Reply: Alejandro Mesa: "RE: Search function, one textbox"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 09 Nov 2004 08:30:31 -0800
Hi
I have a text box on a homepage that I want to use to search three
fields in the database so far I have:
Select * from Contacts
where
firstname like '%' + @SearchPhrase + '%'
or
surname like '%' + @SearchPhrase + '%'
or
company like '%' + @SearchPhrase + '%'
Which works find but when the search phrase is "Bob Harris"
then is won't return anything, as 'bob' is in firstname and 'harris' in
lastname
What's the best way to deal with the multiple search parameters?
Thanks
Angela
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: L Gonzales: "Decrypt"
- Previous message: L Gonzales: "Re: Encrypted Stored Proc"
- Next in thread: Alejandro Mesa: "RE: Search function, one textbox"
- Reply: Alejandro Mesa: "RE: Search function, one textbox"
- Messages sorted by: [ date ] [ thread ]