view raw
Girish Kumar G Girish Kumar G - 6 months ago 59
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.

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