Girish Kumar G Girish Kumar G - 23 days ago 13
MySQL Question

Query for Product name search

Hi I have a Mysql Database which have product details in a table.I need to search product details by using a query.

Eg:When i type "Dosa" in the name search entry, it should be display "Dosa",Masala Dosa","Ghee Dosa" etc form product table.I used following query.But it is not usefull.

"SELECT productname FROM

productmaster
WHERE productname LIKE 'DOSA%' ORDER BY productname".
It will list Dosa only.Kindly help in this regard.

Answer
select * from productmaster where productname like '%DOSA%'