From: | Matt Beauregard <matt(at)designscape(dot)com(dot)au> |
---|---|
To: | Dan Harrington <dan(at)tudan(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: increment/rank |
Date: | 2000-12-19 02:49:01 |
Message-ID: | 20001219134901.I30281@designscape.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Dec 19, 2000 at 07:29:33PM -0700, Dan Harrington wrote:
> I get a two-record list of:
> ----------------------------------------------------------------------------
> -
> Peaceful Stream | image/stream.jpg | water peace | 102
> Wide Stream | image/wide.jpg | water peace flowing | 101
> ----------------------------------------------------------------------------
> -
> ...and I select "Wide Stream", I want to change the rank number from 101 to
> 102.
Your description of the problem is ambiguous, and so my answer which
is very simplistic may not be useful at all. Properly set-up tables
need a primary key which is unique for each record; I'm making the
bold assumption that in your case the image filename will do as a
primary key. So if you only want to "change the rank number" you
could do something like
update images set rank=102 where filename='image/wide.jpg'.
If the rank field has more semantics than you mentioned in your email,
you should define them for us.
--
Matt Beauregard
Information Technology Operations, DesignScape
Ph: +61 2 9361 4233 Fx: +61 2 9361 4633
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Wood | 2000-12-19 03:22:03 | Re: PL/pgSQL Trigger Problems |
Previous Message | Brett W. McCoy | 2000-12-19 01:15:00 | Re: src/Makefile.global |