INSERT...ON DUPLICATE ROW
Posted: Tue May 20, 2008 3:49 pm
Is there any MYSQL Syntax that will allow me to Insert records and Either append or update records based on the matching values of a ROW rather than a UNIQUE or PRIMARY KEY?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Well I knew about this but the thing is the primary Key is a auto incremented and the other columns can contain duplicates. The data is not going to have the auto incremented field. So i need to match the VALUES of the WHOLE ROW except the auto increment column.
yeah thought so...Jcart wrote:I don't fully understand what you are trying to do.
If a row matches exactly with some input you have, you want to update? This will involve two queries.