You are here: How to delete a record in a one to many situation when using a list in form « PHP Programming Language « IT news, forums, messages
How to delete a record in a one to many situation when using a list in form

Posted by rich on 10/12/32 11:48

I am building a database and I am using a list where I can make
multiple choices. The data is like this

Master table
item1id
item2
index(item1id)

detail table
item1id
item2id
index (item1id, item2id)

item2 table
item2id
item2
index(item2id)

My form would have

Item1

list of all the choices for item2 table where I can make multiple
choices.

This piece is easy enough to do inserts with. Loop on the listbox
array and insert.
Now the question is what do I do to:
1. Make changes
2. Delete an item.

Do I instead of update, build a function where I delete all the items
in the detail table belonging to item1 and then insert the new list?
Or is there a more elegant way to handle this?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация