FROM pages p
	      INNER JOIN pages_text pt ON = pt.page_id AND pt.language_id = 1
	      INNER JOIN products_params_sizes ps ON = ps.size_id AND ps.quantity > 0 AND ps.product_id = 
	      WHERE 1
	      GROUP BY
	      ORDER BY p.order_id

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE 1
	      GROUP BY
	      ORDER BY p.order_id' at line 5

file -
line -