List:General Discussion« Previous MessageNext Message »
From:Octavian Rasnita Date:December 13 2005 10:04pm
Subject:Re: bug in MySQL 5?
View as plain text  
From: "Gleb Paharenko" <gleb.paharenko@stripped>

> Hello.
> 
> In my opinion, it is not a bug. REPLACE has returned the sum
> of affected rows - one was deleted, and one was inserted. See:
>   http://dev.mysql.com/doc/refman/5.1/en/replace.html
> 
> 

Thank you. I have seen that's the true.
Is there any MySQL command that instead of 

if(record exists) {
delete line
insert new line
}
else {
insert line
}

does something like:

if (record exists) {
update record with the specified fields
}
else {
insert record
}

Thank you.

Teddy

Thread
bug in MySQL 5?Octavian Rasnita13 Dec
  • Re: bug in MySQL 5?Gleb Paharenko13 Dec
  • Re: bug in MySQL 5?Octavian Rasnita13 Dec
    • Re: bug in MySQL 5?Michael Stassen14 Dec