On Mon, 2009-05-11 at 12:09 -0700, lemming110 wrote: [...] > But using extra(select={'comment_count': sql,}) where > > sql = '''select count(*) > from django_comments > where django_comments.content_type_id=12 and > django_comments.object_pk= > %s''' > > gives me an error every way that I have tried to add quotes.
And if you cared to say what that error was, somebody might be able to help you. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---