1
Well I retrieve the date and time of a record like this:
$sql = $conexao->query(select data, hora from pedido);
$resultado = mysqli_fetch_object($sql);
$resultado->data;
$resultado->hora;
I need to add 5 hours and check if the date is longer than every current time.
How can I make this calculation is verification?
I wish I had something like that
if ((data e hora da tabela com + 5 horas) => (data e hora atual)) {
echo "o pedido já foi finalizado a mais de 5 horas";
}
Good with that I can add hours, but I don’t know how to buy.
– Hugo Borges
Just compare the return of
strtotime
.– Woss