|
Re: lug-bg: MySQL update
- Subject: Re: lug-bg: MySQL update
- From: Petko Yotov <5ko@xxxxxxx>
- Date: Fri, 19 Sep 2003 20:04:55 +0200
Ако правилно съм разбрал въпроса, решението е много лесно:
sql>UPDATE `tablica` SET `credit`=5 WHERE `credit`<11
или
sql>UPDATE `tablica` SET `credit`=5 WHERE (`user_id`<4 OR `user_id`>7)
Поздрави,
Петко
martin petkov <martin_petkov@xxxxxxxxx> wrote:
(19/09/2003 14:28)
> 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
============================================================================
|
|
|