|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Infamous Next/Previous Navigation - PHP/Perl
Hey Guys,
I understand how to create a <<previous 1 2 3 next>> navigation for a Limit query but I would like to click on one of the items of this query, display it in it's item page, and include a <<previous next>> nav at the top of the item chosen. For simplicity, lets say that the initial query selected every item in my MySQL table. Is there anything in MySQL or a reference ID off the initial query that can be referenced to say that the item chosen was row#27 of the query results and the next>> link would show row#28? The only thing I can think of off the top of my head is when row#27 is chosen the auto-incr field is used as a ref. The item # if the "item" is used as a primary key though Thank you, QRycheOM |
|
#2
|
||||
|
||||
|
I'm thinking of a couple ways to solve this... The easy way is to simple make the "next" link go to the next ID in the table (or maybe the next post in chronological order some how)... should be easy and logical. (i think you elude to this one in your post)
A more complicated suggestion is... well... if your clicking an article off of search results, store the search results in the session as an array. Then make the next and previous links the appropriate items in the session variable.
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Infamous Next/Previous Navigation - PHP/Perl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|