Hallo
Wenn ich meine Produkte nach bestimmten Kriterien selktieren will (z.b. von A - Z ) , crashed die Abfrage mit folgender Fehlermeldung :
256 - (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY p.products_id ORDER BY p.products_price ASC' at line 23
SELECT
p.*,
pd.*,
p2c.*,
c.*
FROM
products p
LEFT JOIN products_description pd ON (p.products_id = pd.products_id )
LEFT OUTER JOIN products_to_categories p2c ON (p.products_id = p2c.products_id)
LEFT OUTER JOIN categories c ON (p2c.categories_id = c.categories_id)
WHERE
c.categories_status = '1'
AND
pd.language_id = '2'
AND
c.parent_id = '5'
AND
p.products_status = '1'
GROUP BY p.products_id
GROUP BY p.products_id ORDER BY p.products_price ASC
Dieser Crash ist eigentlich logisch, denn zweimal nach dem gleichen zu groupieren ist schwierig
p.products_status = '1'
GROUP BY p.products_id
GROUP BY p.products_id ORDER BY p.products_price ASC
Könnt ihr diesen Fehler bitte beheben und mit dem anderen SQL Fehler (siehe Fix8) einen neuen Fix machen. Danke