List:General Discussion« Previous MessageNext Message »
From:Yves Goergen Date:September 14 2004 11:07pm
Subject:Re: INSERT on duplicate UPDATE?
View as plain text  
Ops, replied to you only...

On 14.09.2004 22:21 (+0200), Dirk Schippers wrote:
 > I think what you mean is REPLACE. Try
 > http://dev.mysql.com/doc/mysql/en/REPLACE.html

No, REPLACE *always* replaces the entire row, but I want to update a
single value only, and if the row doesn'T exist, it should be created
with initial values. But there's a comment on that page that tells that
"INSERT ... ON DUPLICATE KEY UPDATE" is "new in mysql 4.1.0". Hm, too
bad. OK, I'll have to work with 2 queries then, SELECT and then INSERT
or UPDATE.

-- 
Yves Goergen <nospam.list@stripped>

BlackBoard Internet Newsboard System --> blackboard.unclassified.de
Free (GPL), easy to use and install, secure, innovative! (PHP+MySQL)
Thread
INSERT on duplicate UPDATE?Yves Goergen14 Sep
  • Re: INSERT on duplicate UPDATE?Dirk Schippers14 Sep
    • Re: INSERT on duplicate UPDATE?Yves Goergen14 Sep
  • Re: INSERT on duplicate UPDATE?Mayuran Yogarajah14 Sep
  • Re: INSERT on duplicate UPDATE?Tobias Asplund14 Sep
    • Re: INSERT on duplicate UPDATE?Yves Goergen14 Sep
  • Re: INSERT on duplicate UPDATE?Sergei Golubchik18 Oct