MySQL Forums
Forum List  »  Newbie

Re: using Insert Ignore for a specific column only
Posted by: Rich Bernstein
Date: November 07, 2022 08:59AM

Thanks Phil. In that table, id is the PK. I do not have an index on the email field. BTW, I am writing this code. The way it works is that users have entered their email as their login. They then enter employees emails (employee_email) for their companies employees.

Right now I allow users to add employees via a CRUD. But now I am adding a way for users to add a list of employee emails, in case they have hundred to add. I don't want them to have two of the same employee_emails because this will screw up the rest of the logic in the app. What would be better is a unique email+employee_email combo. How would I do this for an existing table? I have not created the table via php.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.