[Zope] delete multiple records sql python etc

Thomas B. Passin tpassin@mitretek.org
Thu, 6 Dec 2001 10:06:54 -0500


[Todd Graham]

>
> I've got a  table called user_accounts that has user_id, application,
> username that make up the primary key, this is a child table to the
> user_info table which has user_id as the primary key.
>
> As part of the application I want my users to be able to delete multiple
> rows from the user_accounts table  that are displayed in a form via a zsql
> method that looks like :
>
> select * from user_accounts
> where user_id = <dtml-sqlvar user_id>
>
> Based on the result sets of the sql method I build a form that lists the
> username, user_id, application etc, with one checkbox for each record.
>
> My question is how do I pass the all the values from one or more rows to a
> python script based on whether or not the box is checked.  I've tried
> several combinations of using record(s) converters and list converters but
> at this point I'm stumped.
>

The question of the day is this: Are you stumped because you don't know how
to write SQL to do this, because you don't know how to write an html form to
collect the delete requests, because you don't know how to handle  the form
data because some checkboxes never get checked, or something else?

Cheers,

Tom P