Unable to list itemsSELECT DISTINCT p.*,c.CatName FROM products p
LEFT JOIN categories c ON (p.CategoryID1=c.id)
LEFT JOIN products_categories pc ON (p.id=pc.ProductID)
WHERE 1 AND p.`Deleted`=0 AND (CategoryID1 = 10 or CategoryID2 = 10 or CategoryID = 10 ) ORDER BY p.priority asc, p.ItemName asc LIMIT 1 MySQL server has gone away