[Zope-DB] Specifying query arguments in DTML

Alex Cowan alex@funcom.com
Tue, 25 Feb 2003 09:49:17 +0100

You can do <dtml-in "sqlMethod(var1=var1, var2=var2)">

You need to make sure that var1 and var2 are defined somewhere though (I
used <dtml-call "REQUEST.set a lot hehe)

Its much easier than passing it in the url (and allows you to keep the
variables secret if you want). In general I only use variables in the url if
I want to give the user a way to get back to a specific page.


----- Original Message -----
From: "Steven Rogers" <srogers1@austin.rr.com>
To: <zope-db@zope.org>
Sent: Tuesday, February 25, 2003 9:40 AM
Subject: [Zope-DB] Specifying query arguments in DTML

> Hi all,
> I'm stumped on something in the DB adapter and hope someone can help. I
> can see how to set up a Z SQL Method and pass the SQL arguments through
> the URL, but is it possible to have a Z SQL Method that gets its
> argument values from the DTML near the <dtml-in sqlMethod> without
> putting it in the URL or having the user submit it through a form?
> I've tried using dtml-let, and scrounged all through the Zope bible and
> can't figure it out. I could create a new ZSQL method with the argument
> hard-coded in it, but that seems to stink.
> Thanks,
> SR
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db