[Zope-DB] how to pass an argument into a Z SQL method without using a form?

Robert Van Overmeiren vanoverr@uniteddrugs.com
Mon, 6 Jan 2003 09:05:29 -0700


Hello,

My question has to do with passing an argument into a Z SQL method without
having to use, or submit, a form.

-----
The SQL is like this:
SELECT GROUP_VALUE FROM APPUSER WHERE USERNAME = <dtml-sqlvar username
type=string>
-----

I want the current Zope user's name to be automatically inserted in place of
the username argument. Can "user/getUserName" be used here somewhere?

This SQL is called from a page template. If the Z SQL method can't request
and insert the Zope user value, then can it be requested and passed to the
SQL from the page template somehow?

Thx
Bob Van