On Sun, 07 Oct 2007 14:40:38 +0200, Bruno Desthuilliers
<bruno.42.desthuilliers@wtf.websiteburo.oops.com> declaimed the
following in comp.lang.python:
> SQLAlchemy is quite a good package (and *way* higher level than anything
> in PHP), but you don't need it to do the above. Any db-api compliant
> package will do:
>
> sql = "SELECT * FROM yaddayadda"
> cursor.execute(sql)
> for row in cursor.fetchall():
> # code here
And the good ones don't even need the .fetchall() to iterate...
for row in cursor:
...
However, if one just wants a raw list of tuples, then...
rlot = cursor.fetchall()
--
Wulfraed Dennis Lee Bieber KD6MOG
wlfraed@ix.netcom.com wulfraed@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-asst@bestiaria.com)
HTTP://www.bestiaria.com/