Girish Kumar G Girish Kumar G - 1 year ago 82
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

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

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