From: Date: September 14 2004 11:07pm Subject: Re: INSERT on duplicate UPDATE? List-Archive: http://lists.mysql.com/mysql/172608 Message-Id: <41475D8E.7090006@unclassified.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 BlackBoard Internet Newsboard System --> blackboard.unclassified.de Free (GPL), easy to use and install, secure, innovative! (PHP+MySQL)