Originally Posted by hm9
the 12th through the 20th is actually 8 days (or 9, if you count both ends of the range)
so you want "departures for the user-entered date and up to 7 days thereafter" (this is what i meant by an explanation -- who knows, you could've meant 7 days before, or both 7 days before and 7 days after)
and i presume today's date is no longer relevant
with '$dep' formatted to year-month-day sequence
WHERE departuredate >= '$dep'
AND departuredate < '$dep' + INTERVAL '7' DAY