Lower record - Mailing list pgsql-general

From Abe
Subject Lower record
Date
Msg-id 008501c06d43$ac501620$6500a8c0@win2k
Whole thread Raw
In response to RE: TODAY and CURRENT?  ("Francis Solomon" <francis@stellison.co.uk>)
List pgsql-general
Hey Guys,

This is probably a trivial question to most but I can't figure it out.  I am
doing a previous button and I need to select the record that has a lower
comment id than the current one.  The problem is I cant use commentid-1
becuase the commentid's are not incremented by one each time but by
different numbers.  I also cant use the following:

$sql = "select threadid, commentid, name, detail from comments where
commentid < '$commentid' and threadid='$threadid'";


 because it gets the lowest value comment whereas what I want is the highest
value comment but lower that $commentid (so basically the one immediately
below this one).

Any help would be appreciated,
Thanks,
Abe


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Performance and doing USENET style threaded messages
Next
From: "Abe"
Date:
Subject: Re: Lower record