Lower record

Поиск
Список
Период
Сортировка
От Abe
Тема Lower record
Дата
Msg-id 008501c06d43$ac501620$6500a8c0@win2k
обсуждение исходный текст
Ответ на RE: TODAY and CURRENT?  ("Francis Solomon" <francis@stellison.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance and doing USENET style threaded messages
Следующее
От: "Abe"
Дата:
Сообщение: Re: Lower record