sql search

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

sql search

Post by sebs »

I have a field in which the user enters some text.If the user enters Bulevard London it finds the results but if he enters London Bulevard it doesn't find anything because in the database I have Bulevard London(example) and not London Bulevard.How can I make an sql query that searches for the words not the phrases?The user can also enter 5 words not only 2!
Thank you!
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Re: sql search

Post by foobar »

Assuming you're using MySQL, use Fulltext search.
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

Post by sebs »

Thanks!
Post Reply