1. Patrick Samson
  2. django-postman
  3. Issues
Issue #1 resolved

Wrong quote character for MySql

Mauro De Giorgi
created an issue

After installing the tool i got this error:

TemplateSyntaxError: Caught DatabaseError while rendering: (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 \'"postman_message" T WHERE T."thread_id" = "postman_message"."thread_id") AS `cou\' at line 1')

I'm using django 1.2.4 and python 2.6

Comments (4)

  1. Mauro De Giorgi reporter

    The error is at line 87 of the models.py:

                'SELECT COUNT(*) FROM "postman_message" T'
                ' WHERE T."thread_id" = "postman_message"."thread_id"'

    I don't understand this syntax and why you do that, but this seems to work:

                'SELECT COUNT(*) FROM postman_message T'
                ' WHERE T.thread_id = postman_message.thread_id'

    Can you tell me something about this?

  2. Log in to comment