[Zope-DB] Newbie question: zsql result conundrum
Thu, 15 May 2003 20:44:23 -0700
I know there must be an easy way to get this. I need to get a field data from
a zsql method recset, where my field name is a variable.
# Example code:
for rec in recset:
print "%s: %s" % (field1, rec.firstname)
print "%s: %s" % (field1, rec.getitem(field1))
The first "print" line will of course work, but I need the second line.
getitem() above doesn't work, nor does getattr() or get(). What's the magic word??
Thanks in advance!