Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 11-19-2011, 08:27 PM   #1
Silver Member
 
Join Date: Aug 2011
Location: Tennessee
Posts: 112
Default How do I set up a search for of database searching for 2 words in different orders

How do I search a database for example, if someone puts in "loose foot", it would return any instance of the word foot with the word loose. If they search loose foot, and foot loose is in the database, it would show up in the search.
Glenn is offline   Reply With Quote


Old 11-25-2011, 04:56 AM   #2
Bronze Member
 
n1c0_ds's Avatar
 
Join Date: Nov 2009
Location: Granby, Québec
Posts: 55
Send a message via Skype™ to n1c0_ds
Default

Quote:
Originally Posted by Glenn View Post
How do I search a database for example, if someone puts in "loose foot", it would return any instance of the word foot with the word loose. If they search loose foot, and foot loose is in the database, it would show up in the search.
Don't accept my answer before confirming with other peers, but your SQL query should be something like ... AND column LIKE %foot% AND column LIKE %lose%

Any result having those two words would be returned. That being said, there are better, more complex ways.
__________________
Nicolas Bouliane
Web designer/developer in Granby, Québec
n1c0_ds is offline   Reply With Quote
Reply

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:51 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.