SELECT p.id, p.promo_until, pt.name, p.slug, pt.price, pt.price_promo, i.image, t.name as type, t.slug as type_slug, b.name as brand, b.slug as brand_slug,
p.cop
FROM products p
INNER JOIN products_text pt ON p.id = pt.product_id AND pt.language_id =
LEFT JOIN products_images i ON p.id = i.page_id
INNER JOIN pages_text t ON p.type_id = t.page_id AND t.language_id =
INNER JOIN pages_text b ON p.brand_id = b.page_id AND b.language_id =
-- INNER JOIN pages_text c ON p.cop_id = c.page_id AND c.language_id =
WHERE p.promo_until > 1732170216
AND p.status != 'deleted'
AND p.available = 'yes'
GROUP BY p.id
ORDER BY RAND()
LIMIT 2
Too many connections
file -
line -