Ver Mensaje Individual
  #12  
Antiguo 24-01-2012
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Hola
Es sencillo
tres tablas
1- vendedores: idV, tel, nombre, activo, etc.
2- clientes: idC (tel del cliente), nombre, lugar, activo, etc.
3- reporte, (el que te envian): IdV (vendedor), IdC (tel Cliente), fecha, tiempo.

Consulta por id del vendedor y la fecha, simple solo de la tabla reporte:

Código SQL [-]
Select * form reporte where idV = :dato and fecha >= :fecha1 and fecha <= :fecha2.

Si quieres puedes hacer otras consultas que te envien tambien el nombre del vendedor, tendras que usar un join en la consulta para ligar las dos tablas.

Saludos
__________________
Siempre Novato
Responder Con Cita