List:MySQL++« Previous MessageNext Message »
From:Jim Wallace Date:November 28 2007 3:20pm
Subject:RE: Update, Insert.....Speed
View as plain text  
I think this is what you're saying.  If you want to insert a row if not
there you can use MySQL's INSERT INTO..ON DUPLICATE KEY syntax.

http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

or REPLACE depending on what you're doing.  Replace will delete and
insert a row if it exists, the other doesn't.

http://dev.mysql.com/doc/refman/5.0/en/replace.html

> -----Original Message-----
> From: Mandy Llanes [mailto:mandy.llanes@stripped] 
> Sent: Wednesday, November 28, 2007 10:02 AM
> To: plusplus@stripped
> Subject: Update, Insert.....Speed
> 
> Hello,
> If I'do Update an row in tables but my row not here return 
> error. I want send SQL to server ... UPDATE table SET f1=v1, 
> f2=v2 WHERE f0="v0" but this row is null that Insert this Row.
> That's possible? How?
> 
> Thank's
> Mandy. 
> 
> 
> -- 
Thread
Update, Insert.....SpeedMandy Llanes28 Nov
  • RE: Update, Insert.....SpeedJim Wallace28 Nov