More tweaks

This commit is contained in:
2013-10-02 19:57:39 +10:00
parent ed2ca13ae8
commit 89d950f7e3

View File

@@ -37,6 +37,7 @@ function booking_report_summary() {
->condition('p.booking_event_id', $event->eid, '=');
$query->groupBy('p.booking_state');
$query->addExpression('COUNT(p.booking_state)', 'state_count');
$query->orderBy('state_count', 'DESC');
$state_stats = $query->execute();
foreach ($state_stats as $state) {