From 048bfb2c76450c1e0f205a6d299ee5a95a5e7653 Mon Sep 17 00:00:00 2001 From: roberto Date: Wed, 11 May 2011 17:07:21 +0000 Subject: [PATCH] Orden descendente de las fechas git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk@59 e2b1556b-49f8-d141-9351-52d6861a72d9 --- src/tablero.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tablero.php b/src/tablero.php index 39016df..874a5ba 100644 --- a/src/tablero.php +++ b/src/tablero.php @@ -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);