Cita:
Iniciado por quimfv
Insisto
Y esa { de la linea 20 y } de la linea 79 para que son?
Hola, he hecho la consulta en phpmyadmin y me da el error:
Código HTML:
Ver originalError
consulta SQL: Documentación
SELECT SUM( datos.material ) AS material ". "
FROM (
SELECT f.realizacion, f.material
FROM facturas f ". "
UNION ALL ". "
SELECT f11.realizacion, f11.material
FROM facturas_2011 f11 ". "
UNION ALL ". "
SELECT f12.realizacion, f12.material
FROM facturas_2012 f12
) AS datos ". "
WHERE datos.realizacion
BETWEEN '".2011/01/01."'
AND '".2011/12/31."'
MySQL ha dicho: Documentación
#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 '".
  "FROM (SELECT f.realizacion,f.material FROM  facturas f ".
  "UN' at line 1