Orden descendente de las fechas
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk@59 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
parent
6e0dda1f92
commit
048bfb2c76
@ -21,7 +21,8 @@ $sql_usuarios = 'SELECT DISTINCT h.oid_h, h_max.fecha_h_max, usuarios.tipo, usua
|
||||
group by 1
|
||||
) as h_max on (h_max.oid_h = h.oid_h)
|
||||
left join usuarios on (usuarios.oid = h.oid_h)
|
||||
where h.fecha_h between date_sub(now(),interval 30 day) and now()';
|
||||
where h.fecha_h between date_sub(now(),interval 30 day) and now()
|
||||
order by h.fecha_h desc';
|
||||
|
||||
$bd=new BD();
|
||||
$resultado_usuarios = $bd->execQuery($sql_usuarios);
|
||||
@ -63,7 +64,8 @@ $sql_ofertas = 'SELECT DISTINCT h.oid_h, h_max.fecha_h_max, clientes.id, pedidos
|
||||
) as h_max on (h_max.oid_h = h.oid_h)
|
||||
left join pedidos on (pedidos.oid = h.oid_h)
|
||||
left join clientes on (clientes.oid = pedidos.cliente)
|
||||
where h.fecha_h between date_sub(now(),interval 30 day) and now()';
|
||||
where h.fecha_h between date_sub(now(),interval 30 day) and now()
|
||||
order by h.fecha_h desc';
|
||||
|
||||
$bd=new BD();
|
||||
$resultado_ofertas = $bd->execQuery($sql_ofertas);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user