MySQL Forums
Forum List  »  PHP

Re: comparing data in a table to user data
Posted by: Bob Field
Date: April 01, 2006 11:58AM

Basically there's two ways to handle it:

1) INSERT IGNORE ... -- if a row would cause a duplicate key error, it is not inserted.

2) INSERT ... ON DUPLICATE KEY UPDATE ... -- if a row would cause a duplicate key error, then the UPDATE is performed instead to uodate the existing row.

Options: ReplyQuote


Subject
Written By
Posted
Re: comparing data in a table to user data
April 01, 2006 11:58AM


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.