[Zope] Howto convert ZSQL results

Dieter Maurer dieter@handshake.de
Sat, 3 Nov 2001 00:07:23 +0100


=?ISO-8859-1?Q?Juli=E1n_Mu=F1oz_Dom=EDnguez?= writes:
 > How to convert to integer the the result of a ZSLQ method  ??
 > 
 > I call a ZSQL method with:
 > l=int(container.last_customer())
This is (essentially) a *LIST* of *ROWS* representing your query result.
You cannot convert it into an integer.

Use:  "int(container.last_customer()[0].<fieldname>)"

More details: Zope book


Dieter