MySQL Forums
Forum List  »  Newbie

UPDATE a value several times in same UPDATE
Posted by: Bigcrime Crimebig
Date: August 17, 2010 09:00PM

Hi!

I will explain my problem in one example:

UPDATE products SET amount = amount+1 WHERE clientid IN ('1','2','4','3','4','4');

as you can see clientid number 4 is repeated 3 times
but it will be updated 1 time only.

I want to tell mysql that update each clientid each time they appear.

How can I do ThaT?

Ill appreciate your help a lot!

Options: ReplyQuote


Subject
Written By
Posted
UPDATE a value several times in same UPDATE
August 17, 2010 09:00PM


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.