I'm trying to implement a list box that populates a link table.
Tables:
- Product
- ProductLink
- Attributes
The listbox is a multi select. When I select a value from the listbox it should insert attributeID and productID into ProductLink. When a value is removed the row should be removed from ProductLink. How do I go about achieving this?
Both attributeID and ProductID are primary keys. At the moment it's trying to insert attributeID but failing as it is trying to insert a NULL value into ProductID which is required.
Any help that you can provide me would be greatly appreciated.
Thanks
Tables:
- Product
- ProductLink
- Attributes
The listbox is a multi select. When I select a value from the listbox it should insert attributeID and productID into ProductLink. When a value is removed the row should be removed from ProductLink. How do I go about achieving this?
Both attributeID and ProductID are primary keys. At the moment it's trying to insert attributeID but failing as it is trying to insert a NULL value into ProductID which is required.
Any help that you can provide me would be greatly appreciated.
Thanks