[Zope] Looking if a record with a given key exists in a database several times, in dtml

Igor Leturia IGOR@emun.com
Sun, 17 Feb 2002 20:42:52 +0100


  Hi all!

  I have a problem: in dtml, I have to iterate through a very big list
and for each item I must look if there is a record with that key in a
database. I can't run a 'select' ZSQLMethod for each, because it would
take too long. What I want to do is run the 'select' ZSQLMethod once and
load the results in a variable (an array or dictionary) which then will
be faster to look up in, or look up in the results of that query in some
fast way.

  I have searched zope.org, but found nothing. Any ideas?

					Igor Leturia