How to write a sql
query to find out that there are 2 days left before the current date.
In php, this can be done via:
$res['end_date'] - time () < 86400 * 3;
How can I do the same after 1 sql
query, well or better, only 2 days, if less so that it does not work out, well, if it works out, it's okay.
UPD:
It is necessary to compose a sql
query that will select only those records that have 2
days left before the end_date
expires
The type is int
for the field end_date
and is stored via the time ()
function in php
.
Can't compose a WHERE
clause.