Update / Delete / Insert quandry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am working on "update" areas for my end users.  This
is where they can go in and update and / or edit
information in their profile. 

The problem I'm having a hard time getting my hands
around are those areas where they can have multiple
entries. 

One of the tables allows for a user to enter up to 5
choices. The table would look like this:

RecordID   TypeID
101          3
101          5
101          9
.........etc.

So I can do a straight update - where if they wanted
to update the example above and change the 3 to a 12
that works fine.  What if they wanted to leave TypeID:
3 but delete 5 and 9.  Or another scenario, if they
wanted to leave the existing ones but add a fourth
record.  

Is there a way I can handle all this in one fell
swoop? I thought of "deleting" all current records
first and letting user make all new choices.  Not sure
if this would work well if many users though.

Any suggestions ?

Thank you,
Stuart

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux