Using Check boxes to do multiple deletes (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Oztrades -> Using Check boxes to do multiple deletes (10/23/2001 20:37:00)

I want to use checkboxes to multiple delete SOME results from a database (eg as in hotmail)
I have started by inserting a DRW into a form, adding checkboxes to the line and a delete button and posting to another form.
What value do i use in the checkbox, the form advanced properties...
So far i can only delete all the tests or receive an error requesting more parameters
Me thinks i need to add the IFTHEN comment but that means posting to another formmmmm
Regards

------------------
" TARGET=_blank>http://www.oztrades.com.au
your choice"





Spooky -> RE: Using Check boxes to do multiple deletes (10/23/2001 14:56:00)

What youll do, is have a group of check boxes. Each with the same name.
eg "DeleteID"
Each checkbox needs to have a value = to the ID of the record.

When you perform a delete, you post to your delete page and do a :"...where ColumnID IN (::DeleteID::)"

What happens, is a comma delimited array is formed containing the ID numbers.
eg : 1,6,12,14

So your SQL string would actually look like :

"...where ColumnID IN (1,6,12,14)"





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625