On Fri, 2007-07-13 at 10:07 +0000, jj wrote:
> Why does the 1st query fail, whilst the 2nd succeeds, although the SQL
> is identical?
> 
> The 1st query indeed returns the error: "OperationalError: no such
> column: 'FR'".

Because you're not quoting the strings correctly. You need to wrap them
in single quotes to be valid SQL. This is one of the strong reasons why
the second approach is better: the DB-API wrappers know how to get the
quoting correct. The slightly painful bit is the usual problem of having
to put in enough placeholders for the number of parameters you have to
go into the IN-clause.

Regards,
Malcolm

-- 
The only substitute for good manners is fast reflexes. 
http://www.pointy-stick.com/blog/


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