coulix wrote:
> Hello,
> I was trying to play with custom query but i didnt manage to get it
> working,

I too could not get the custom query from the API reference working:

polls.get_list(
    select={
        'choice_count': 'SELECT COUNT(*) FROM choices WHERE poll_id =
polls.id'
    }
)

Trying the query in a 0.91/MySQL installation on both Mac OS X and an
NT box generated the same error. (Since there's a single quote, a
backtick and a double quote in the error message, it seems something is
wonky in the behind-the-scenes query quoting.)

ProgrammingError: (1064, "You have an error in your SQL syntax.  Check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'SELECT COUNT(*) FROM choices WHERE poll_id =
polls.id) AS `choi")

John


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to