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( >> select * from "users" where "uid" = ? >> ) >> ''', >> (v['uid'],s.SID, v['uid']) >> ) > > This will be more efficient if you do "select uid from users". What will be more efficient ? Do you mean the "select * ..." or do you want to take the exists sub-query out and put it in a python if ? Rob. -- http://www.victim-prime.dsl.pipex.com/ -- http://mail.python.org/mailman/listinfo/python-list