I have a .jsp page that has a multi checkbox. I'm able to insert the multiple checkbox values but when use an update, it adds the current checkbox rows plus the additional checkbox value rows. If I check one more box it should add 1 more row and so on.
Here is my code that works for inserting data, this works okay:
CollDAO.java
Insert checkbox records
If I select 2 check boxes this is what it looks like.
rID | qID | cID -- CORRECT OUTPUT
101 | 121 | 9
100 | 121 | 13
Here's code for Updating checkbox records, this does not work.
If I select 3 check boxes this is what get updated.
rID | qID | cID -- WRONG OUTPUT
105 | 121 | 2
104 | 121 | 9
103 | 121 | 13
101 | 121 | 9
100 | 121 | 13
This is what it suppose to look like.
rID | qID | cID -- CORRECT OUTPUT
103 | 121 | 2
101 | 121 | 9
100 | 121 | 13
I've been working on this for a week, can you help me?
Thank you
Here is my code that works for inserting data, this works okay:
CollDAO.java
Insert checkbox records
If I select 2 check boxes this is what it looks like.
rID | qID | cID -- CORRECT OUTPUT
101 | 121 | 9
100 | 121 | 13
Here's code for Updating checkbox records, this does not work.
If I select 3 check boxes this is what get updated.
rID | qID | cID -- WRONG OUTPUT
105 | 121 | 2
104 | 121 | 9
103 | 121 | 13
101 | 121 | 9
100 | 121 | 13
This is what it suppose to look like.
rID | qID | cID -- CORRECT OUTPUT
103 | 121 | 2
101 | 121 | 9
100 | 121 | 13
I've been working on this for a week, can you help me?
Thank you