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

Geir Bækholt Geir Bækholt <geirh@funcom.com>
Thu, 9 Jan 2003 12:47:52 +0100


on or about, Monday, January 06, 2003, we have reason to believe that
Ben Avery wrote something along the lines of :
> I'm not too hot on ZPT, maybe you could put a python expression in the
> call to your zsql method to grab the AUTHENTICATED_USER value.
> failing that, you could put a python script wrapper around the zsql=20
> method to get the authenticated user and pass it into the script.

Why not just put it all in the ZSQL-method and avoid confusion =3F

SELECT GROUP_VALUE FROM APPUSER
WHERE USERNAME =3D <dtml-sqlvar "REQUEST.AUTHENTICATED_USER.getUserName()" =
type=3Dstring>

:)




--=20
Geir B=E6kholt        geir@funcom.com
Tools/HCI-developer
Tools/Billing - Product Operations
Funcom Oslo