Multiple mysql ORDER BY's for multidimensional ordering/grouping
问题 I have a set of data that needs to be ordered in multiple ways simultaneously. Simplified, the table can be summarised as: Task id group (int) date (date) complete (0/1) I need to produce a list of these tasks, sorted primarily by 'complete', secondarily by 'date' and then grouped by 'group'. The group is what's causing the issue for me and I have a feeling this might be better achieved with PHP, as it may not be possible as part of the query - tips on the best way to approach this are