I'm looking for a simple "non-kludgy" way to get the NEXT item
in an SQL Result list. For example this list was ordered by name.
and I currently have id 5 for Bob. Now I want to do the same SQL
query again and get the next item afer Bob, 8 Cathy:
ID Name
---------
87 Alice
5 Bob
8 Cathy
93 David
33 Eve
...
I could use a TCL loop with a
while { [ns_db getrow $db $selection] } {
and set a flag when I reach ID 5, do one more loop to get ID 8
then exit and present the edit page for ID 8
Is there a quicker and more elegant way within PG SQL to
get the same answer?
I'm using this so that when editing an individual
on one webpage, the user can go to edit the next individual in the
result list by clicking "Save and Next" button instead
of going back to that list to click the "Edit" Button.
Currently they can't press the back button without an extra click
on the "Retry" because this is form post data...
"This form cannot be refreshed without resending...".
So I want them to skip the list entirely and just go
to the next individual item and edit it.
TIA
-Bob