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 ,
Rob Williscroft wrote:
Aahz wrote innews:guao50$1j...@panix3.panix.comin comp.lang.py
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 ,
>> Rob Williscroft wrote:
>>
>>
>>
>> >Aahz wrote innews:guao50$1j...@panix3.panix.comin comp.lang.python:
>
On May 13, 11:46 am, a...@pythoncraft.com (Aahz) wrote:
> In article ,
> Rob Williscroft wrote:
>
>
>
> >Aahz wrote innews:guao50$1j...@panix3.panix.comin comp.lang.python:
> >> In article ,
> >> Rob Williscroft wrote:
>
> >>>db.execute( '''
> >>> update "sessions" set "uid" = ?
> >>>
In article ,
Rob Williscroft wrote:
>Aahz wrote in news:guao50$1j...@panix3.panix.com in comp.lang.python:
>> In article ,
>> Rob Williscroft wrote:
>>>
>>>db.execute( '''
>>> update "sessions" set "uid" = ?
>>> where "uid" = ?
>>> and exists(
>>> selec
Aahz wrote in news:guao50$1j...@panix3.panix.com in comp.lang.python:
> In article ,
> Rob Williscroft wrote:
>>
>>db.execute( '''
>> update "sessions" set "uid" = ?
>> where "uid" = ?
>> and exists(
>> select * from "users" where "uid" = ?
>>
In article ,
Rob Williscroft wrote:
>
>db.execute( '''
> update "sessions" set "uid" = ?
> where "uid" = ?
> and exists(
> select * from "users" where "uid" = ?
> )
>''',
>(v['uid'],s.SID, v['uid'])
> )
This will be more efficient if you do "sel
On 11 mei, 23:07, Rob Williscroft 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 executed
> > toget
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
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 si