Klaida SQL: SELECT p.ProductId, p.Namelt AS Name, p.Alias, if(p.PriceDiscount IS NULL OR p.PriceDiscount=0 OR p.PriceDiscount>p.Price, p.Price, p.PriceDiscount) AS Price, If(p.PriceDiscount IS NULL OR p.PriceDiscount=0 OR p.PriceDiscount>p.Price, 0, CEIL(p.PriceDiscount*100/p.Price)-100) AS Discount, p.Price AS OldPrice, IFNULL((SELECT f.Url FROM ProductPhotos f WHERE f.ProductId=p.ProductId ORDER BY f.SortOrder LIMIT 1), '/upload/NoProduct.jpg' ) AS Image, (SELECT ManufacturerName FROM Manufacturers m where m.ManufacturerId=p.ManufacturerId) as ManufacturerName, (SELECT Name FROM cms_menu WHERE MenuId='1713') AS MenuName, mn.LineAge AS LineAge FROM Products p JOIN cms_menu mn ON p.MenuId = mn.MenuId WHERE p.MenuId IN ( SELECT MenuId FROM cms_menu WHERE ParentId = 1713 AND IsVisible=1) AND p.IsVisible=1 AND mn.LineAge IS NOT NULL ORDER BY p.SortOrder LIMIT 100 OFFSET 0klaidos tekstas: MySQL server has gone away