homepage Welcome to WebmasterWorld Guest from 50.19.169.37
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Determine relative record number of a table row
relative record number
Tourex




msg:4159801
 11:00 am on Jun 26, 2010 (gmt 0)

Is there any way to quickly/easily identify the relative record number of a specific table row within a given dataset? Let me to explain…

Using MySQL/PHP, each product page of our website will contains a set of 12 thumbnail images illustrating/linking to other products in the same product group, with pagination links to further pages if there are more than 12 products in that group. The thumbnails are presented in product code order with the currently selected/displayed product thumbnail highlighted. So, products 1 to 12 will always show thumbnails 1 to 12. Page two of the group will always display thumbnails 13 to 24, etc.


Now my question/problem is how to determine which ‘page’ of thumbnails a product is after a user clicks on an image. So, when looking up product “xyz”, how do I determine whether it is on page 1 (row 1-12) or page 2 (row 13-24), etc, of all records for that particular product group.

The stupid thing is that I know the answer is simple, but it is totally escaping me and driving me nuts. I’ve got a total memory block on it. Any pointers will be much appreciated.

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved