Page 1 of 1

Go to next record problem in detailpage

Posted: Tue Jul 26, 2005 9:36 am
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

Posted: Tue Jul 26, 2005 9:52 am
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)

Posted: Tue Jul 26, 2005 10:55 am
by goezi
thanx,

I'm gonna try this

btw: ben ook uit belgiƫ. (maakt het mss wat makkelijker)