Mysqli Error: 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 A.id_maquina ORDER BY A.id_maquina DESC' at line 10
SELECT A.*, B.titulo AS tit_sub, C.titulo AS tit_mar, D.modelo, D.anio, D.horas, D.no_serie, E.nombre AS vendedor, F.titulo AS cat_name, G.titulo AS tit_prov, G.portada AS portada_prov, H.titulo AS et_tit, H.color AS et_col FROM maquina A LEFT JOIN subcategoria B ON A.id_subcategoria = B.id_subcategoria LEFT JOIN marca C ON A.id_marca = C.id_marca INNER JOIN maquina_datos D ON A.id_maquina = D.id_maquina INNER JOIN datosusuario E ON A.id_vendedor = E.idusuario INNER JOIN categoria F ON A.id_categoria = F.id_categoria LEFT JOIN marca G ON A.id_proveedor = G.id_marca LEFT JOIN etiqueta H ON A.condicion = H.id_etiqueta WHERE 1 = 1 AND A.status = 1 AND A.id_categoria = 299 AND A.id_subcategoria = GROUP BY A.id_maquina ORDER BY A.id_maquina DESC