2 2219 8800
Av. Jorge Alessandri Rodríguez 12667, San Bernardo.


Error description: 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 ORDER BY pp.posicion asc, DESC' at line 1

SELECT, pd.nombre,, p.marca_id, MIN(if(pd.descuento > 0, pd.descuento, pd.precio)) as valorMenor FROM productos p JOIN productos_detalles pd ON = pd.producto_id LEFT JOIN posicion_productos pp ON = pp.producto_id LEFT JOIN lineas_productos lp ON = lp.producto_id WHERE p.publicado = 1 AND lp.categoria_id = 67 AND lp.linea_id = group by ORDER BY pp.posicion asc, DESC