Hey folks. How do you use the <dtml-sqlgroup> & <dtml-where> clauses when you want to do a join? If I have a table of items, and a table of owners, and items have an owner_id, then selecting all of them would be something like: select o.name as ownername, i.name as itemname from owners o, items i where i.owner_id = o.id; If you wanted to re-use this query for showing items owned by a single owner, you can extend it as: select o.name as ownername, i.name as itemname from owners o, items i where i.owner_id = o.id and o.id = 2; -- Assuming the owner you were interested in was #2 Is it possible to do the join always, but the "o.id = 2" only if an owner id was provided as an optional argument? Also - in some cases I want "limit 10", and others I don't want a limit. Is the limit keyword optionable? Thanks in advance! -- Colin Fox cfox@crystalcherry.com CF Consulting Inc. GPG Fingerprint: D8F0 84E7 E7CC 5C6C 9982 F1A7 A3EB 6EA3 BC97 572F