sql
fecha de carga :2012-02-23 verde 2012-02-25 amarillo2012-02-29 rojo 2012-03-01
Código PHP:
<?php
$f1 = $row_tareas['fechadecarga'] ;
$can_dias = 1 ;
$can_dias2 = 5 ;
$hoy = $row_tareas['fechadecarga'] ;
$verde= $row_tareas['verde'];
$amarillo=$row_tareas['amarillo'];
$hoy2 = date("Y-m-d") ;
?>
<?php
mysql_select_db($database_localhost, $localhost);
$query_tareas = "SELECT * FROM tareas WHERE NOW() between '$verde' AND '$amarillo' ORDER BY id DESC";
$tareas = mysql_query($query_tareas, $localhost) or die(mysql_error());
$row_tareas = mysql_fetch_assoc($tareas);
$totalRows_tareas = mysql_num_rows($tareas);
?>