I have a start and an end date in my database and a $date variable from a form field. I am now trying to query all the rows where $date is either = start/end date in the db,
Use this
$today = new DateTime( date('Y-m-d')); $fiveYearsBack = $today->sub(new DateInterval('P5Y'));