Welcome Guest, Not a member yet? Register   Sign In
If user ID exists in database, UPDATE. Otherwise, INSERT (HELP)
#10

[eluser]Barwick[/eluser]
[quote author="CroNiX" date="1352170165"]replace always does a delete and then an insert, so it basically always acts as an insert since it deletes the existing row if it exists. Still a little more overhead (2 operations) than ON DUPLICATE KEY UPDATE.[/quote]

Haha, yeah I don't like the sounds of delete THEN ask questions later. I've read some horror stories pertaining to this.


Messages In This Thread
If user ID exists in database, UPDATE. Otherwise, INSERT (HELP) - by El Forum - 11-05-2012, 08:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB