Jump to content

How can i insert multiple checkbox values into join table


hardikspider

Recommended Posts

Hi I have 3 tables.

 

employee-Firstname, last name, teamid

Join_team - id,teamid,officeid

office-officeid, officename

 

I have form. which has below fields

 

firstname, lastname

multiple Office(checkboxes)

 

If I click on submit button. data shoud insert into tables.

 

Can you plase guide me how can I insert multiple office(checkboxes) into join tables?

 

Let me know if you have nay question. I can clarify

 

Thanks

 

Link to comment
Share on other sites

employee------<employeehadcheckboxs>-------checkboxes

 

employee has pk id and a bunch of other columns.

checkboxes has pk id and a bunch of other columns.

employeehadcheckboxs has two columns which are the other two tables pk

 

User submits form which includes employeeID and a bunch of checkbox ids.

 

Either delete all records in  employeehadcheckboxs for employee and reinsert the new ones, or find out which ones have changed, and update accordingly.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.