RE: Insert and Update together

2006-02-11 Thread Logan, David (SST - Adelaide)
t --- -Original Message- From: Andre Matos [mailto:[EMAIL PROTECTED] Sent: Sunday, 12 February 2006 2:23 PM To: George Law; mysql@lists.mysql.com Subject: Re: Insert and Update together No George. I took a look there before sent this

Re: Insert and Update together

2006-02-11 Thread Andre Matos
No George. I took a look there before sent this email to the mysql list. My case it is not a duplicate record. What I want is that if the update in one table happen, it will be proceed by an insert in another table like a log of changes. Andre On 2/11/06 12:48 PM, "George Law" <[EMAIL PROTECTED]

Re: Insert and Update together

2006-02-11 Thread George Law
Andre, I tried this a couple weeks ago... I think you want the "on duplicate" option for the INSERT query. depends what version you have... I think this was introduced in mysql 4.1 insert into values () on duplicate key update set x=2,y=5; unfortunately, the server I was testing thi