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);