Im a bit new to php and sql and I have this problem:
I have a DateTime field called EndDate.
I need to select and only show records that are current.
Ive tried many variations of the following:
SELECT EndDate FROM booking ORDER BY EndDate ASC WHERE EndDate > NOW()
To fulfill your requirement given in the title of your question, use DATE_ADD:
SELECT EndDate FROM booking WHERE EndDate >= NOW() AND EndDate < DATE_ADD(NOW(), INTERVAL 2 YEAR) ORDER BY EndDate ASC