SQL SELECT item_categories.categoriesname as 'category', a.BrandName as 'BrandName',b.Quantity,a.*,Case WHEN (a.ImageQty) REGEXP '^[0-9]+$' THEN 'No' else 'Yes' end AS 'HasSize', LOCATE('/',a.ImageColor) as 'HasColor' FROM items_list a
inner join item_categories on item_categories.SrNo = a.`ImageCategory`
LEFT JOIN ShopingCart_new b ON
a.ItemCode = b.ItemCode and b.SID='FPK64193DEBBC7614.29660007'
where a.ItemActive=1 and (BrandName like '%%Gucci%(GG)%Watches%' OR PageTags like '%%Gucci%(GG)%Watches%') Order By SrNo desc LIMIT 0, 250;