QUERY Error Query string SELECT pieid FROM pieces, modeles WHERE (piegenre="moto" AND piedsp=1 AND pieprix!=0 AND piepht=1 AND ((piestock=1 AND piecde=0) OR (piegen=1 AND piegenstk>0)) AND piemod=modid AND piephr=876 GROUP BY pieid ORDER BY piephrnomfr, piecrtdt DESC Error > 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 'GROUP BY pieid ORDER BY piephrnomfr, piecrtdt DESC' at line 1