1
How can I check whether an if was executed or not, and whether it was not it to display an Alert?
Take 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 DB, if it does not update it shows Alert. I need to do the same thing, but I need him to check the first IF condition, in case: if ($newtime!=0) {
It is possible to do this?