Re: IF statement
If you create a unique constraint for that combo, felix's ON DUPLICATE KEY solution should work out fine.
If you dont want that, you can get away with it using multiple statements and encode it all in the where clause of you update and your inserts. Check out this thread:
http://forums.mysql.com/read.php?10,36053,36053#msg-36053
Subject
Written By
Posted
Re: IF statement
July 31, 2005 12:54PM
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.