Hey folks,

Hoping someone can provide me with a quick solution to an odd problem im having. I have the following code that displays records out of a shipping database, it groups boats by their status, then sorts by arrival date in ascending order. The problem is it actually puts the visits for the next month before the visits of the current month... quite odd

PHP Code:
ORDER BY (CASE t1.VisitStatus when 'Departed Vessel' then 1 when 'At Anchor' then 2 when 'In Port' then 3 else 4 end), ArrivalDate ASC 
any help would be greatly appreciated