> Warning: You can only execute one statement at a time.
...
>         cursor.execute("""
>             BEGIN;
>             UPDATE clients
>             SET connected = 'false'
>             WHERE connected = 'true'
>             AND tugid <> %s;
>             COMMIT;""", [local_tugid])
> 
> Am I doing something wrong here?

I suspect sqlite doesn't like to have multiple commands in the 
same execution.  You have 3 commands: BEGIN, UPDATE, and COMMIT. 
  Django should be handling the transactions for you, so you 
don't need the BEGIN or COMMIT.  Just issue

   cursor.exectue("""
     UPDATE clients
     SET connected = 'false'
     WHERE connected = 'true'
     AND tugid <> %s""", [local_tugid])

-tim




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

Reply via email to