displayexpt.php?softID=$softID displays a checkbox
list of experts for a given piece of software. The
admin needs to select each user he wants to delete.
This is then posted to deleteexpt.php?softID=$softID,
which must delete users from the apliexpert table with
a statement like this:
DELETE FROM apliexpert WHERE id=$id AND
softID=$softID;

Given more than one expert may need to be deleted I
think I need some kind of loop that makes a passes a
different delete statement for each $id. To handle the
multiple $ids I have the following for loop:
##### code ########
for ($index = 0; $index < $total_records; $index++) {
    if (isset($id[$index])) {
         $sql2 .= "Clave = \"" . $id[$index] . "\"";
    }
##### end ########

I've tried changing $sql2 to:
"DELETE FROM apliexpert WHERE id = \"" . $id[$index] .
"\"";

but the loop doesn't work; it deletes the first record
and then stops.

thanks :))

J

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to