Re: lug-bg: MySQL update
- Subject: Re: lug-bg: MySQL update
- From: Stratsimir Kolchevski <lug@xxxxxxxxxxx>
- Date: Fri, 19 Sep 2003 16:06:43 +0300
UPDATE `table` SET credit = credit + 5 WHERE (user_id >= 1 AND user_id
<= 4) OR (user_id >= 7 AND user_id <= 8);
Za poveche informatsia http://www.mysql.com/doc/en/UPDATE.html ;-)
HTH,
Stratsimir
martin petkov wrote:
Zdraveite,
bihte li me posyvetvali za slednata situacia
iskam da update-na opredeleni stoinosti v dadena
kolona po uslovie ot druga kolona v syshtata tablica
naprimer
----------------
|user_id|credit|
----------------
|1 |10 |
|2 |10 |
|3 |10 |
|4 |10 |
|5 |20 |
|6 |20 |
|7 |10 |
|8 |10 |
----------------
t.e. kak da se update-nat stoinostite na credit (s 5
naprimer), koito sa s user_id ot 1-4 i 7-8 .
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|