Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/01/2012, 18:26
kriss8725
 
Fecha de Ingreso: mayo-2009
Mensajes: 242
Antigüedad: 17 años, 5 meses
Puntos: 2
Respuesta: Dias restantes

Aqui esta un ejemplo realizando un consulta SQL:

Código PHP:
$fechaHoy = date('Y-m-d');
$restantes = $this->consulta("SELECT DATEDIFF('".$fechaLimite."','".$fechaHoy."') AS dias");
$resultRestantes = $this->fetch_array($restantes);
foreach(
$resultRestantes as $rowRestantes):
  
$diasRestantes = $rowRestantes['dias'];     
endforeach;