John Machin wrote in news:b722bd36-c8f1-4cdf-8625-2550cee21511
@i28g2000prd.googlegroups.com in comp.lang.python:
On May 13, 11:46 am, a...@pythoncraft.com (Aahz) wrote:
In article xns9c09513903e8frtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
Aahz wrote
On 14/05/2009 8:21 AM, Rob Williscroft wrote in private e-mail
(presumably by mistake):
On 13 May 2009, you wrote in comp.lang.python:
On May 13, 11:46燼m, a...@pythoncraft.com (Aahz) wrote:
In article xns9c09513903e8frtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk
Aahz wrote in news:guao50$1j...@panix3.panix.com in comp.lang.python:
In article xns9c08e179b66d8rtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
db.execute( '''
update sessions set uid = ?
where uid = ?
and exists(
In article xns9c09513903e8frtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
Aahz wrote in news:guao50$1j...@panix3.panix.com in comp.lang.python:
In article xns9c08e179b66d8rtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
On May 13, 11:46 am, a...@pythoncraft.com (Aahz) wrote:
In article xns9c09513903e8frtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
Aahz wrote innews:guao50$1j...@panix3.panix.comin comp.lang.python:
In article
I am trying to do this in a single transaction, the 3 separate
statements work fine, but i am screwed if they are not executed
together.
### db.execute('BEGIN') #
db.execute('UPDATE users SET uid=? WHERE uid=?',(v['uid'],s.UID))
db.execute('UPDATE sessions SET uid=? WHERE
gert wrote in news:d7591495-4661-4243-ad7e-f142d8244e88
@e24g2000vbe.googlegroups.com in comp.lang.python:
I am trying to do this in a single transaction, the 3 separate
statements work fine, but i am screwed if they are not executed
together.
Well you're in luck, Python DBAPI 2 connections
On 11 mei, 23:07, Rob Williscroft r...@freenet.co.uk wrote:
gert wrote in news:d7591495-4661-4243-ad7e-f142d8244e88
@e24g2000vbe.googlegroups.com in comp.lang.python:
I am trying to do this in a single transaction, the 3 separate
statements work fine, but i am screwed if they are not
In article xns9c08e179b66d8rtwfreenetremovec...@216.196.109.145,
Rob Williscroft r...@freenet.co.uk wrote:
db.execute( '''
update sessions set uid = ?
where uid = ?
and exists(
select * from users where uid = ?
)
''',
(v['uid'],s.SID,