I have a simple task list which contains amongst others a title field and a deadline field. Some tasks got deadlines, other don't. Deadlines are simply stored with a MySQL date type.
But the tough part (for me anyway) is to sort the tasks in the correct order:
- Ascending deadlines
- The rest (maybe by ID, but not important)
Current query:
SELECT * FROM tasks ORDER BY deadline ASC
The deadline field is '0000-00-00' by default, so this query will show the tasks in the following order:
- Tasks with no deadlines
- Ascending deadlines
Can anybody point me in the right direction, or do I need to do multiple queries?