I have a problem with a query, and I hope it's not a zope bug I have 2 tables 'tabdef_theme'[ntheme,valtheme] and 'tab_theme'[ntheme,ndoc] this query#1 works: SELECT t1.valtheme FROM tabdef_theme AS t1 , tab_theme AS t2 WHERE t2.ndoc =<dtml-var numero_doc> AND t1.ntheme = t2.ntheme GROUP BY t1.valtheme ORDER BY t1.valtheme and query#2 too: SELECT t1.ntheme FROM tabdef_theme AS t1 , tab_theme AS t2 WHERE t2.ndoc =<dtml-var numero_doc> AND t1.ntheme = t2.ntheme GROUP BY t1.valtheme ORDER BY t1.valtheme BUT this one query#3 SELECT t1.ntheme , t1.valtheme <<<<<<<<<<<<<<<<<< FROM tabdef_theme AS t1 , tab_theme AS t2 WHERE t2.ndoc =<dtml-var numero_doc> AND t1.ntheme = t2.ntheme GROUP BY t1.valtheme ORDER BY t1.valtheme I get: <!-- Traceback (innermost last): File /usr/local/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /usr/local/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: quel_theme) File /usr/local/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_test) File /usr/local/Zope-2.3.1-linux2-x86/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_test) File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Shared/DC/ZRDB/DA.py, line 396, in manage_test (Object: quel_theme) File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Shared/DC/ZRDB/DA.py, line 374, in manage_test (Object: quel_theme) File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Shared/DC/ZRDB/DA.py, line 489, in __call__ (Object: quel_theme) File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Products/ZGadflyDA/db.py, line 178, in query File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Products/ZGadflyDA/gadfly/gadfly.py, line 355, in execute File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Products/ZGadflyDA/gadfly/sqlsem.py, line 2819, in eval File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Products/ZGadflyDA/gadfly/sqlsem.py, line 1286, in map File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Products/ZGadflyDA/gadfly/sqlsem.py, line 1145, in value File /usr/local/Zope-2.3.1-linux2-x86/lib/python/Products/ZGadflyDA/gadfly/kjbuckets0.py, line 534, in __getitem__ KeyError: (see above) --> this seems to be the correct SQL syntax (from mySQL reference manual) I tried SELECT t2.ntheme , t1.valtheme SELECT * SELECT t1.* => nothing works ... THANX () / \ | <> | (____) zazen rules ... _______________________________________________________ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/