[Zope-DB] create sql statement dynamicly

Ralf Duda Ralf.Duda@m2s-clip.de
Thu, 10 Jan 2002 15:23:38 +0100


Hello,

at first i'm just start with zope so please don't flame me
if my question is to stupid.

What i have:
A form for database requests.
Quite easy with zope. :)

In that form i have a text field named 'Name' for type in the query
arguments.
Quite easy also.

What i need:
But for the user it should be possible to type in querys like:
---
    Name: Paul OR Henry OR Michael
---
or like
---
    Name: Paul AND Peter
---

The sql query itself is not the point, but how to manage the
variations in zope.

What i have thought is:
- split the input, extract the special words (AND, OR, etc.)
- create the select statemant dynamicly
- get the data and show it in a report

Is there any zope trick?
Do i need a python script?
If i need a python script, is this a job for a 'Pluggable Brain'?

I have not found a hint in the newgroups or in the zope-book
so i would be much obliged if someone can give me a hint.

with best regards,
Ralf