Ver Mensaje Individual
  #6 (permalink)  
Antiguo 14/10/2008, 08:43
Avatar de sirguy
sirguy
 
Fecha de Ingreso: septiembre-2006
Ubicación: Mallorca
Mensajes: 959
Antigüedad: 18 años, 4 meses
Puntos: 12
Respuesta: Dudas con fechas php y sql

Otra vez, he pensado que seguro que sabeís bastante más que yo así que he puesto esto:

Código PHP:
$result=mysql_query("select UNIX_TIMESTAMP(fecha) AS fecha,UNIX_TIMESTAMP(fecha_pro) AS fecha_pro from tabla order by id desc",$link);
$row=mysql_fetch_array($result);
while(
$row mysql_fetch_array($result)) { 
$mia=$row["fecha"];
$fechuna=strtotime("+7 days"$mia);
$id=$row["id"];
$resultadum=mysql_query("UPDATE tabla SET fecha_pro=$fechuna where id=$id",$link); 
Y no ni caso, me pone fechas del 2000. Aunque sea una tontería llevo toda la mañana, es increíble.

Un saludo
__________________
Chanante!