How can I check if an if was executed and if it did not display an alert?
See the example:
if ($newtime!=0) {
$qryupd = "update registration set dados=" . $dadosnew . " where id=$id";
$result2 = mysqli_query($db, $qryupd);
if (!$result2) {
rollback();
echo '[{"resultado":"falhou","total_lances":"' . $bal . '","motivo":"Falha ao executar lance, por favor tente novamente! Código: LW102"}]';
exit;
}
}
In this example it already does this for the query that updates in the DB, if it does not update it shows the alert. I need to do the same thing, but I need it to check the first IF condition, in the case: if ($newtime!=0) {
Is it possible to do this?