Re: [Zope] how to get next iteration values?
- Original Message - From: Dieter Maurer [EMAIL PROTECTED] Jaroslav Lukesh wrote at 2007-9-17 13:42 +0200: ... does somebody knows how to get next iterations of columns from SQL query? I think that is only due my unknowledge of right pythonic syntax. dtml-let vypisSQL_LET=vypisSQL() -- ZSQL method results catch dtml-in vypisSQL_LET prefix=listing current value: dtml-var column next value: dtml-var vypisSQL_LET.column[listing_number] -- here is an error Do it in a Script (Python). It is much easier there Apart from that: vypisSQL_LET[listing_number] is the next hit (provided it exists). Thus, vypisSQL_LET[listing_number].column is the column field of the next hit. Be aware that you need to handle the boundary case (that you are already at the last hit). It works! Many thanks for your help, JL. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how to get next iteration values?
Jaroslav Lukesh wrote at 2007-9-17 13:42 +0200: ... does somebody knows how to get next iterations of columns from SQL query? I think that is only due my unknowledge of right pythonic syntax. dtml-let vypisSQL_LET=vypisSQL() -- ZSQL method results catch dtml-in vypisSQL_LET prefix=listing current value: dtml-var column next value: dtml-var vypisSQL_LET.column[listing_number] -- here is an error Do it in a Script (Python). It is much easier there Apart from that: vypisSQL_LET[listing_number] is the next hit (provided it exists). Thus, vypisSQL_LET[listing_number].column is the column field of the next hit. Be aware that you need to handle the boundary case (that you are already at the last hit). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )