Reputation: 1
I'm trying to get all dates after a given date in MySQL, but the results are the exact opposite of what I want.
$sql = "SELECT DISTINCT(DRFDate) FROM tblDRF WHERE DRFDate > $DepartureDate";
But this is giving me all the dates before $DepartureDate
Upvotes: 0
Views: 332
Reputation: 700
Your need to put $DepartureDate
in a single quote.
$sql = "SELECT DISTINCT(DRFDate) FROM tblDRF WHERE DRFDate > '$DepartureDate'";
Upvotes: 1