Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    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.

  • #2
    Senior Coder A1ien51's Avatar
    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.
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts