[ZPT] Passing where clause to zsql method

Michael Fair michael@daclubhouse.net
Mon, 25 Mar 2002 14:00:37 -0800


> do this in DTML and not ZPT.  I understand how it would work if we're
> taking text input from a form, but I don't want to take input from the
> user, I need to make it a link.

If you already know how to do this from a form pretend you
did a "maker = REQUEST['maker']" and substitute accordingly.
A link that does path/to/destinationzpt?maker=returnedvalue
would emulate the form code you already know how to create.

Otherwise you need to get into sessions and assigning session
values to pass previous results on to future pages.

> Then my second question comes up, where
> should I actually make the link to? A python script that calls the zsql
> method, or would I link to a page template which calls the zsql
> method?  Any suggestions would be appreciated or direction to a site that
> has some info about this on it.   Thanks for any time spared

You _ALWAYS_ send your users to a page that produces HTML.
That page then retrieves any content it might need.

So in this case, send your users to a ZPT that knows how
to call a ZSQL query that returns the makers of contact lenses.

-- Michael --