[Zope-DB] How can I dynamically generate a Z Search Interface?

Tena Sakai tena.sakai.b@bayer.com
Thu, 29 Aug 2002 19:13:53 -0700


Please help me.

So far what I have been doing is to generate Z Search Interface
statically.  Ie., I have some Z SQL method, which typically looks
      select  *
        from  mytable

and then I manually "add" Z Search Interface based on this Z SQL
method.  I use resultant dtml method in the way I want.  It works
quite well.

But now I want to do this dynamically.  Namely, I have gotten
a dtml method that creates a Z SQL method.  The output might
look something like:
      select  emp_id, phone, zip
        from  mytable

The portion at the right of select keyword is dynamic.  It say
these three words because the user checked on these three check-
boxes.  It could be that the user might select 5 column names
or 3 completely different ones.  The point is that they are
created on the fly.

How would I do the query based on this Z SQL method?  Is there
any method or something I can use to generate yet another dtml
method on the fly?

I'd appreciate any pointer.

Thanks very much.

Tena Sakai