#3485: Initial SQL fails with MySQLdb driver when data contains a % in it.
--------------------------------+-------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  jacob        
     Status:  reopened          |            Component:  Uncategorized
    Version:  SVN               |           Resolution:               
   Keywords:                    |                Stage:  Unreviewed   
  Has_patch:  0                 |           Needs_docs:  0            
Needs_tests:  0                 |   Needs_better_patch:  0            
--------------------------------+-------------------------------------------
Changes (by [EMAIL PROTECTED]):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 From my understanding of SQL, it's not a quoting issue.  The initialdata
 is in raw sql format.  The postgres statement is:
 
 {{{
 INSERT INTO cms_contentblock (id, page_id, name, body) VALUES (4, 3,
 'email_format', 'Question From: %(name)s <%(email)s>
 
 %(question)s
 
 ');
 }}}
 This query works fine from the MySQL command line utility or through a
 couple of different mysql administration tools.
 In order for Django to properly put it into MySQL we had to change the
 query to:
 {{{
 INSERT INTO cms_contentblock (id, page_id, name, body) VALUES (4, 3,
 'email_format', 'Question From: %%(name)s <%%(email)s>
 
 %%(question)s
 
 ');
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3485#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to