[EMAIL PROTECTED] wrote:
>         cursor.execute("""
>             SELECT sports_players.city_id, sports_players.team_id,
> count(sports_players.team_id) FROM sports_players,
> sports_mastercitylist
>             WHERE sports_players.city_id=sports_mastercitylist.id
>             AND sports_mastercitylist.cityslug = %s
>             GROUP BY 1, 2
>             ORDER BY 1""" % city)
try changing that last part to "Order by 1 """, [city])

http://www.djangoproject.com/documentation/model-api/#executing-custom-sql

--B

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to