[Zope-DB] SQL Oracle and Drop Down Boxes
dieter.fischer at grid-it.ch
Wed Nov 12 18:20:25 EST 2003
> I am new to Zope and Python and Web Development really. I am
> trying to do
> something I am sure must be very simple. I want to query an
> Oracle database
> table using SQL and populate a drop down box with the
> returned values. Can
> anybody point me in the direction of a simple example?
I'm using for that the formulator product:
Having an SQL-Method 'countries_sql' like this:
SELECT code AS code,
text AS text
WHERE domain = 'COUNTRY'
which is called by a python script 'countries_py':
result = 
for sql in container.countries_sql():
tuple = sql['code'], sql['text']
you can call this in the form TALES/Items with:
Works fine and is resusable.
More information about the Zope-DB