[Zope] Re: CheckBoxes, dynamic lists and SQL insert statements

Julian Clark Julian.Clarke@b-online.com.au
Wed, 16 Jul 2003 14:56:20 +0800


Sergey,

Thanks for your prompt reply.
This worked a treat.

Cheers,
Julian

----- Original Message ----- 
From: "Sergey Volobuev" <zope@phpv.khv.ru>
To: "Julian Clark" <Julian.Clarke@b-online.com.au>
Cc: <zope@zope.org>
Sent: Wednesday, July 16, 2003 2:34 PM
Subject: Re: [Zope] Re: CheckBoxes, dynamic lists and SQL insert statements


I'm not sure if  sequence-xxx variables available in this way (in a 
method, called inside of a loop). Maybe it will work in this way (see 
lines inside your quoting). Warning: untested

><!-- meth_step_2 (I think this is ok - but I guess that this is where the
>problem lies)  -->
><!--#with sql -->
>    <!--#in marketinglist -->
>
                     <dtml-call "REQUEST.set('my_item', 
_['sequence-item'])">

>        <!--#call insert_holding_table -->
>    <!--#/in -->
><!--#/with -->
>
>When I display <!--#var sequence-item --> within the in statement, the
>correct values display, they're just not seeming to make it
>to my query.
>
><!-- insert_holding_table (this works by itself, but perhaps not when called
>by a dtml method)   -->
>insert into mHoldingTable
>(
>dealer_code
>)
>values
>(
>
        <dtml-sqlvar my_item type="string" >

>);
>  
>