Re: getting results into one variable

2005-11-10 Thread s99999999s2003
Steve Holden wrote: > [EMAIL PROTECTED] wrote: > > That's a nice email address :-) > > hi > > the database "execute" function returns a list of logical results. Each > > logical result is a list of row tuples, as explained in the documents. > > > In a DB-API-compliant module, execution of the quer

Re: getting results into one variable

2005-11-10 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > hi (snip) > > in python, can we do something like > > a = db.execute(stmt) and then expand variable 'a' > instead of doing > (a,b) = db.execute(stmt) for return of 2 > (a,b,c) = for return of 3 > (a,b,c,d) for return of 4 Did you try ?-) Took me about 30'': >>> def

Re: getting results into one variable

2005-11-10 Thread Steve Holden
[EMAIL PROTECTED] wrote: That's a nice email address :-) > hi > the database "execute" function returns a list of logical results. Each > logical result is a list of row tuples, as explained in the documents. > In a DB-API-compliant module, execution of the query adn retrieval of the result(s) a

getting results into one variable

2005-11-10 Thread s99999999s2003
hi the database "execute" function returns a list of logical results. Each logical result is a list of row tuples, as explained in the documents. everytime i use it to execute various statements, it returns me, for example ([(0,)], [(0,)], [(0,)]) and sometimes , ([(0,)], [(0,)]) or ([(0,)]) in m

Re: getting results into one variable

2005-11-10 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > a = db.execute(stmt) and then expand variable 'a' > > instead of doing > (a,b) = db.execute(stmt) for return of 2 > (a,b,c) = for return of 3 > (a,b,c,d) for return of 4 What do you intend to do with a, b, c,d ? a = f(x) always work. You can later then do a : if len