MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 9th, 2006, 06:44 PM
QrycheOM QrycheOM is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 6 QrycheOM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 14 m 37 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old August 10th, 2006, 09:17 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Infamous Next/Previous Navigation - PHP/Perl


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT