I believe that prash21m is trying to get search results returned even if the search query contains something not in the description.
I haven't done anything like this for a while so there may be a more efficient way to do this but what I did when I needed to do something like this is convert the input string in to an array then loop through that array, expanding the SQL qeury with OR statements. Note that the below is from memory.
$search = $_POST["search"]; //Your variables may be different.
$searcharr = explode(" ",$search); //This converts the search string into an array, using the spaces as delimiters.
$sql = "SELECT * FROM table_name WHERE description LIKE %".$searcharr[0]."% "; //This starts the SQL query and inputs the first entry of the array.
for ($i = 1; isset($searcharr[$i]; $i++) //This will continue to loop as long as there is another word/entry in the string.
{
$sql .= "OR description LIKE %".$searcharr[$i]."% "; // This will append the SQL query. Note the period in front of the equals.
}
$sql .= ";"; //This closes off the SQL query.
You then run the SQL query as normal.
With this code, you search the database per word instead of the whole string. The conversion to an array from a string will convert this:
20% off on all product and clothes
To this:
Array
{
[0] = 20%
[1] = off
[2] = on
[3] = all
[4] = product
[5] = and
[6] = clothes
}