Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Multiple update logic problem
12-02-2003, 08:03 AM #1
- Join Date
- Nov 2003
- Malaysia (Boleh!)
- Thanked 0 Times in 0 Posts
Multiple update logic problem
I have a little question here. It is about multiple update.
For the first time, I multiple insert some records to a table and the next time, if I want to make changes (let's say insert more records), I will have redundant records isn't? So, how do I solve this problem. Insert first, then delete the redundant records. Is it possible to only insert records which is not redundant?
Eg, (I use checkbox style in a form to add records. The process page I use insert into [table] (field)values() style)
HobbiesID, Hobbies, UserID, Status
1, basketball, ,steve, yes
2, bowling, steve, yes
The next time, I come back again, the form will have both basketball and bowling's checkbox checked. If, I add select another checkbox for badminton, how the process page code look like?
Hope everyone understand my scenario here. Thanks for all feedback.
12-02-2003, 03:15 PM #2
- Join Date
- Jun 2002
- Between DC and Baltimore In a Cave
- Thanked 94 Times in 88 Posts
Basically you are going to have to do a search through the recordset before inserting the data. If the search returns no records then update it.