[Zope] passing a zope <dtml-in...> list element to a sql method

Roger Mallett rogermallett at hotmail.com
Sun Sep 28 01:33:18 EDT 2003


I am attempting to access an element from a list and pass the element to a 
SQL method.

The SQL method can see the list if I put it in the arguments list for the 
SQL method.  However, I only want an element of the list.

I have the following code (in my form submit action):

...
...
<dtml-elif name="delete_button_delete_a_category_form">
  <dtml-try>
      <dtml-in category prefix=MyElement>
        <dtml-var MyElement_item><br>
        <dtml-var a_trash>
      </dtml-in>

...
...


MySQL:

Argument:  MyElement_item    <<<<  doesn't work

INSERT INTO trash VALUES ('<dtml-var name="MyElement_item" sql_quote>')


I can see the elements iterating with the <dtml-var MyElem....> statement.

I can also see the sql statement executing during each loop if I use a 
static element for the SQL value.

I can even plop the whole list into the SQL each iteration.

However, I only want to plop in the current element of the iteration.

What must I do??

_________________________________________________________________
Frustrated with dial-up? Get high-speed for as low as $29.95/month 
(depending on the local service providers in your area).  
https://broadband.msn.com




More information about the Zope mailing list