Re: Specifying a join table for a customized query

2009-08-04 Thread Malcolm Tredinnick
On Tue, 2009-08-04 at 18:41 -0700, Daybreaker wrote: > See a recent thread here: > > http://groups.google.com/group/django-users/browse_thread/thread/0ee03167b7b5e873/850ac8304bf952b4#850ac8304bf952b4 > > and this query: > > mymodel.objects.extra(select={'ordering_field': 'IF(STRCMP > (bbs_tag.

Specifying a join table for a customized query

2009-08-04 Thread Daybreaker
See a recent thread here: http://groups.google.com/group/django-users/browse_thread/thread/0ee03167b7b5e873/850ac8304bf952b4#850ac8304bf952b4 and this query: mymodel.objects.extra(select={'ordering_field': 'IF(STRCMP (bbs_tag.name, 'notice'), '',bbs_tag.name)'}, order_by=['ordering_field']) bb