Keyword search problem, in Mysql

Asked

Viewed 39 times

0

The problem is: How can I perform a search for results per keyword contained separately in the database?

Ex: I search for "RED CARS". php executes the query "SELECT * FROM table WHERE field LIKE '%$Keywords%'"

The problem is: In this query, I would return only results with the words in sequence, as I typed "RED CARS". If I have a result like "Photos of WHITE AND RED CARS", the search will not index this result, even containing the keywords I reported... How do I fix this? Search for keywords even regardless of the order and if they are separated by other words, as google does?

  • Put the % between the words also: "%RED CARS%"

  • 1

    And then there’s this one: http://answall.com/questions/15242/70

  • 1

    Another variation of the problem: http://answall.com/questions/35487/70

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.