Using hook_views_query_alter to change your views sort order

Brad :

Sometimes you might need some extra help getting views to sort correctly. This is especially the case when sorting on a column that might include NULL values, or when your criteria for how results should sort is complex. Instead of implementing template logic to correct the result sorting, you can use hook_views_query_alter to modify the sort criteria in the query itself.

Posted 11/24/2009 - 11:05