Question Detail

How to create smart search : search By Keyword in php

5 years ago Views 1334 Visit Post Reply

I am using to Search my Queary is using Like Clouse in SQL Query that is finding particular Searched Sentance in the database and response me.

Like Clouse need exact statement in Database then it will response else it will reflect only empty data.

Instead of this, I need on my website when I search for anything it will respond by keyword not sentence.
How can I do it? 

Thread Reply


- 5 years ago

You can use this query

SELECT * FROM tablename
WHERE column LIKE '%keyword to search%'