how to search for every word in the search query using PHP MySql -


i using php , mysqli fetching records database .
table engine = innodb.

mysql v5.5

suppose have records

1 | beautiful switzerland girl |
2 | beautiful rabbit in park |
3 | natural sea |

now if search query beautiful return first 2 records problem if searched beautiful anything , return nothing want first 2 records displayed in case because has word beautiful in it. using select * table name '%value%' order id asc mysql query searching right .

is there other query or method achieve or possible option develop custom algorithm .

i suggest lucene or solr full text searching functionality. give fast data comparatively direct database query.

reference links :
http://oak.cs.ucla.edu/cs144/projects/lucene/
http://www.avajava.com/tutorials/lessons/how-do-i-use-lucene-to-index-and-search-text-files.html


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -