[Zope] RE: Insert Help
Todd Loomis
tloomis@dmso.mil
Tue, 26 Feb 2002 15:11:41 -0500
Dieter:
I've did this and this is what the list looks like ['1', '2', '3'], when i
submit it doesn't do 1 insert for each element
it just does one.
this is how it comes from my from:
<input type=checkbox name=options:list value=1>1
<input type=checkbox name=options:list value=2>2
<input type=checkbox name=options:list value=2>2
then my sql statement:
<dtml-in options>
insert into UserRoles values (<dtml-sqlvar options type=string>)
<dtml-unless sequence-end><dtml-var delimiter></dtml-unless>
</dtml-in>
Can you make any other suggestions.... sorry for being pain just need some
help!
Todd
At 07:21 PM 2/26/2002 +0100, you wrote:
>Todd Loomis writes:
> > Could you explain a little more I still seem to be trying to input
> > everything all on one record. I need to break out in an array then each
> > needs to be added to the database as a separate record. Maybe I missed
> > something.
>I can only be more specific when I know your data model.
>
>The explanation is already almost as specific as it can be:
> > ....
> > Thus, you use something like:
> >
> > <dtml-in options>
> > insert into ...
> > <dtml-unless sequence-end><dtml-var sql_delimiter></dtml-unless>
> > </dtml-in>
>Provided "options" contains a sequence, then you will get
>one insert for each sequence element.
>
>The missing parts are your data model...
>
>
>Dieter