Go to next record problem in detailpage

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
goezi
Forum Newbie
Posts: 2
Joined: Tue Jul 26, 2005 9:25 am

Go to next record problem in detailpage

Post by goezi »

I have the following question: How can I make a go to next record in a detailpage?
I have created a master page and a detailpage.

Masterpage recordset is a repeatregion non filtered
From masterpage to detailpage i've jused this link:

Code: Select all

testdetail2.php?Lotnumber=<?php echo $row_catalogus['Lotnumber']; ?>
The detailpage is filterd with Lotnumber=Lotnumber.
This page works fine, but I can't go to the next detailpage of the following record.

Is this possible? When it is possible, how can i fix this?
[As you maybe can see, I've always used dreamweaver mx for creating my phpsites.]

Greetz
Goezi
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

You need to find out what the "next" id is... and then simply provide an url to detail.php?Lotnumber=$next...

You can find the "next" id by

Code: Select all

SELECT Lotnumber 
FROM TABLE 
WHERE Lotnumber > '$current_lotnumber' 
ORDER BY Lotnumber
LIMIT 1
But instead of using the lotnumber to drive the navigation between the different pages... You could use a virtual "pagenumber".. And look at the various pagination scripts.. (You are in the special case that $rows_per_page == 1)
goezi
Forum Newbie
Posts: 2
Joined: Tue Jul 26, 2005 9:25 am

Post by goezi »

thanx,

I'm gonna try this

btw: ben ook uit belgië. (maakt het mss wat makkelijker)
Post Reply