[Zope-DB] how to fetch and set a value from a result object

Jon Erickson jon.erickson@neicoltech.org
12 Dec 2002 14:17:35 -0600

On Thu, 2002-12-12 at 13:31, Robert Van Overmeiren wrote:
> Hello,
> I would like to know how to interate over a Z SQL Method result object,
> which returns a single unique result, and set a variable's value to this
> unique result within a python external method. 

results = context.zsql_method(arg=value)

for row in results:
    myvar = row['db_column_name']

You may also find the ZSQL Results How-To helpful.



Jon Erickson