[Zope] Passing parameters :python script to Zsql method

Dieter Maurer dieter@handshake.de
Fri, 20 Jul 2001 21:43:13 +0200 (CEST)


facelle@libero.it writes:
 > ....
 > I have the following Dtml document  (named "form_itemSearch") :
 > 
 > <form action="search" method="get">
 > <p>Please enter the following information:</p>
 > Code : <input name="code:string"><br>
 > <input type="submit" value=" Search "><br>
 > </form>
 > 
 > 
 > Then I have the following "search" dtml document :
 > 
 > <dtml-call "process_input (code)">
 > <dtml-call "search_Item (code2=code1)">
You discard the output of "process_input".
Instead, you want use it as "code1":

   <dtml-in "search_Item(code2=process_input(code))">
     do something with search result rows
   </dtml-in>
> ....
 > And my "search_Item" zsql method (argument: code2 )is :
 > 
 > select * from items
 > where code_item in (<dtml-sqlvar code2 type=string>)
Your "code2" is not a string, is it.

Use:

	where <dtml-sqltest code2 column=code_item multiple>


Dieter