Ver Mensaje Individual
  #8 (permalink)  
Antiguo 06/07/2009, 09:43
Avatar de a83
a83
 
Fecha de Ingreso: noviembre-2005
Ubicación: Santiago de chile
Mensajes: 637
Antigüedad: 18 años, 5 meses
Puntos: 1
Respuesta: como puedo sumar

me envia este error
#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 u.categoria = c.id_ClasesProducto and f.id_Cliente = cl.id_Cliente
' at line 1


cabien la cosnulta por una mas chica esta es
Código PHP:
SELECT f.Fecha,p.Nombre,c.Nombre,sumu.Cantidad),f.id_Guia,u.id_Guia,cl.Nombre

from tblguias 
as f,tblproducto as p,tblclasesproducto as c,tblguiasdetalle as u,tblclientes as cl where 

f
.id_Guia=u.id_Guia and
 
f.id_Cliente=cl.id_Cliente and 

u.Categoria=p.id_Producto and ---->  estoy  comparando  la  categoria  x el Producto

 GROUP BY u
.categoria=c.id_ClasesProducto and ---->estoy  comparando las    clases  de  producto

f
.id_Cliente=cl.id_Cliente