From ddcbc75bd490011eaf40e0302e1975723d0b170f Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Mon, 7 Jul 2003 18:08:32 +0000 Subject: [PATCH] Ahora toma la fecha para buscar las noticias de la ultima semana --- sistema/www/noticias.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sistema/www/noticias.php b/sistema/www/noticias.php index 16e2119..a53f34f 100644 --- a/sistema/www/noticias.php +++ b/sistema/www/noticias.php @@ -28,8 +28,10 @@ require_once '../local_lib/HTML_Noticia.php'; require_once '../../lib/mecondavdb.php'; $db = MEconDAVDB::Connect(); - $fecha_limite = '2003-07-01'; - $fecha_nuevo = '2003-07-07'; + $hoy = new Date(); + $fecha_nuevo = $hoy->format('%Y-%m-%d'); + $hoy->subtractSeconds(60*60*24*7);//7 dias + $fecha_limite = $hoy->format('%Y-%m-%d'); $query = "SELECT Articles.article_id, IF(Articles.publication_date > '$fecha_nuevo', 'NUEVA', null) FROM Articles, ArticlePublicationStates -- 2.43.0