|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
next and prev in sql
Hi, I was wondering if there was an easy way to handle the following.
I have a dyanmically created web site which flips through team members. I have next and prev buttons to flip. The order is based on name. Now I do have a drop down box which also selects and that is working, I know how to order by name in sql. BUT for the buttons I want to use sql to get the nest item based on name ... example 1.ted 2.bob 3.james you are on james, the button for next would need to point to record 1 and the prev would need to point to 2. can SQL do this if given 3.james??? or do I have to get the whole table and work it out myself. I am still a novice with sql. Thanks, I hope I explained myself well enough |
|
#2
|
|||
|
|||
|
RE: next and prev in sql
You'd need to work it out yourself...sql has no concept of previous and next links....
|
|
#3
|
|||
|
|||
|
RE: next and prev in sql
I figured, what is the best way - added them to the database or calculate by grabbing the whole table?
|
|
#4
|
|||
|
|||
|
RE: next and prev in sql
Well, you can almost do it with SQL. Something like this:
|
|
#5
|
|||
|
|||
|
RE: next and prev in sql
will that work?
intersting concept, it should in theory what the hey I will try it |
|
#6
|
|||
|
|||
|
RE: next and prev in sql
it worked!
excellent work. then, of course, I wanted to get fancy and introduce another variable into the equation as far as order goes, which failed completely so I had to work around but the main idea did work. Thanks |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > next and prev in sql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|