I like to compare a date (extract from database with a null value (0000-00-00).
I try to do like that:
$dateValue = $row_recordset3['ttDateEnvoiDEP'];
if ($dateValue === '0000-00-00') {
$dateEnvoiDEP = "CURRENT_DATE()";
}
else {
$returnOK .= $dateValue;
$dateEnvoiDEP = $row_recordset3['ttDateEnvoiDEP'];
}
But it doesn’t work, do you know why?
why don’t you do it directly in your
SQLquery, something like this,