[Zope] Re: Checkbox question!

Andreas Heckel andreas@easyleading.org
Thu, 16 May 2002 17:01:35 +0200


"Tille, Andreas" wrote:
> 
> On 15 May 2002 florian@fischer.tc wrote:
> 
> > First i have a HTML Formular:
> > -----------------------------
> As a colleague of Florian I try to clarify the question a little bit
> more abstract:
> 
>     There is a list of checkbox entries and he wants to iterate over
>     each marked entry.  Assume you are in a normal Zope folder, mark
>     some objects and press delete button.  This is exactly what
>     Florian tries to do except that the deletion has to be performed
>     at some rows in a SQL database and the Id of those rows is
>     presented as list of checkboxes.
> 
> Thanks four your help
> 
>          Andreas.
> 
> 
>florian@fischer.tc wrote:
>Second the SQL File "arten_delete":
>-----------------------------------
>DELETE FROM arten_tabelle WHERE id_art=<dtml-sqlvar id_art type="int">;
>
>and third the submit File to the SQL File:
>------------------------------------------
> <dtml-in get_arten_tabelle> 
> 
> <dtml-if expr="id_art[1]==id_art_auswahl">
>  <dtml-call arten_delete>  
> </dtml-if>
>
> </dtml-in>
>
>"arten_tabelle" returns a list of numbers in "id_art_auswahl"._

<dtml-call "delete_auswahl(auswahl=id_art_auswahl)">

DELETE FROM arten_tabelle WHERE id_art IN (<dtml-var
"_.string.join(auswahl,',')">)

UNTESTED !!!

-- 
_______________________________________________________________________
Andreas Heckel                                  andreas@easyleading.org