Rick Sanchez February 2016

PHP: Return more than one ID of employees/users to a product table

I have a table of products which each product has an employee/s that is/are responsible of. (gets an email with every update regarding this product).

These are the tables:

Table Products
prod_id     | prod_name |  prod_ios_id  |  prod_android_id  |   **prod_user**

Table Employee  
**emp_id**  |    emp_name       |   emp_email       |   emp_password        | emp_permissions

After submitting The function gets more than one ID (or an array of IDs).

What is the right way to add more than 1 ID to a table cell 'prod_user' in case ?

Answers


smk67 February 2016

You have to add a 3rd table.

Table Products_Employee

prod_id, emp_id

The cell prod_user in Table Products can be deleted.

Post Status

Asked in February 2016
Viewed 3,441 times
Voted 5
Answered 1 times

Search




Leave an answer