I want to prevent certain fields from being duplicated.
I have the fields: id, intUserID, intFollowID
And I'm only inserting intUserID and intFollowID. The 'id' column is my key and is auto-incremented.
So far, I have:
But that would require 'id' to be duplicated as well in order for it to be ignored. How do I revise this so that if the intUserID and intFollowID exist in the database, it will not be inserted again?Code:INSERT IGNORE INTO `tbl_follow_suggestions` (intUserID, intFollowID) VALUES ('8', '10'), ('8', '24')
Thanks for the help.



Reply With Quote

Bookmarks