MySQL Forums
Forum List  »  Newbie

Update duplicates. Help needed
Posted by: Joseph Szenasi
Date: July 25, 2005 10:31PM

Hello.

I need a script to remove duplicates from a table, meaning, update with a new value.

$sqlquery = "INSERT INTO $table (test,test1) VALUES ('$query','$time')";

Now.. If test exists I need to update test1, if not, just insert it in the database. I can`t use ON DUPLICATE KEY UPDATE, I have an older version of mysql. How can I do what I need?

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Update duplicates. Help needed
July 25, 2005 10:31PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.