Welcome Guest, Not a member yet? Register   Sign In
Insert or update if key exists
#4

[eluser]netricate[/eluser]
[quote author="Mark Neill" date="1295492062"]If this is MySQL, use "REPLACE INTO", it will take care of all the key-already-exists logic for you.[/quote]

I believe REPLACE will delete and insert, which can have side effects depending on your table setup.


Messages In This Thread
Insert or update if key exists - by El Forum - 01-19-2011, 01:42 PM
Insert or update if key exists - by El Forum - 01-19-2011, 01:56 PM
Insert or update if key exists - by El Forum - 01-19-2011, 02:54 PM
Insert or update if key exists - by El Forum - 02-13-2011, 07:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB