MySQL Forums
Forum List  »  Spanish

Autoejecucion
Posted by: Social SocialWstore
Date: February 11, 2014 11:38AM

hola de nuevo, tengo este codigo el cual es un contador de dias entre dos fechas, yo quisiera saber si cuando el contador me llege a 0 inmediatamente haga una funcion, por ejemplo eliminar un usuario, o cambiarle el estado corte o algo asi pero que se haga automaticamente? me podiran ayudar con esto, que debo de hacer como hacerlo gracias de antemano

<?php
$fecha_actual = date("d-m-Y");
function dateDiff($start, $end) {
$start_ts = strtotime($start);
$end_ts = strtotime($end);
$diff = $end_ts - $start_ts;
return round($diff / 86400);
}
echo dateDiff("$fecha_actual", "$friends_row->fcorte");
?>
<?php } } else { ?>
<?php } ?>

Options: ReplyQuote


Subject
Views
Written By
Posted
Autoejecucion
1168
February 11, 2014 11:38AM
678
February 11, 2014 03:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.