What's wrong with (NOW(), INTERVAL 2 DAY)?

It would seem that simple code

$sqld = "DELETE FROM Funders WHERE reg_date < (NOW(), INTERVAL 2 DAY)";

if ($conn->query($sqld) === TRUE) {
 echo "Record deleted successfully";
} else {
 echo "Error deleting record:" . $conn->error;
}


Error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')'

What am I doing wrong?
July 8th 19 at 15:54
1 answer
July 8th 19 at 15:56
Function you forgot to write. SUBDATE(), judging by the context, or some other.
Even if I have the date stored in the timestamp? - Corine_Beier commented on July 8th 19 at 15:59
Who cares how you have stored the date, if you have a syntax error? DBMS just can't recognize what you want from him. - aniya commented on July 8th 19 at 16:02
: what error is that? ) - Corine_Beier commented on July 8th 19 at 16:05

Find more questions by tags MySQLPHP