phpSensei Posted January 6, 2008 Share Posted January 6, 2008 Here is the site http://www.render-works.com/clients/solo_client0001/index.php As you can see the previous, and next button arent working, but i am trying to code it. I already coded this, where it goes to the next record in the data, I just got the highest id, and lowest one, and put it in a LIMIT, but what if its Id: 1 2 5 6? Because the next button is always +1. As you can see, I can't find any other ways of doing this... Help? Quote Link to comment https://forums.phpfreaks.com/topic/84683-solved-prev-next/ Share on other sites More sharing options...
chronister Posted January 6, 2008 Share Posted January 6, 2008 http://www.sampsonvideos.com/videos/PHP/PHP_Pagination/ here is a really good video on how to do pagination. You should not rely on the lowest id and highest id, you should count the results and divide them up X per page based on the number of results independent of the id's of the table. Quote Link to comment https://forums.phpfreaks.com/topic/84683-solved-prev-next/#findComment-431565 Share on other sites More sharing options...
Ken2k7 Posted January 6, 2008 Share Posted January 6, 2008 Here is the site http://www.render-works.com/clients/solo_client0001/index.php As you can see the previous, and next button arent working, but i am trying to code it. I already coded this, where it goes to the next record in the data, I just got the highest id, and lowest one, and put it in a LIMIT, but what if its Id: 1 2 5 6? Because the next button is always +1. As you can see, I can't find any other ways of doing this... Help? So you're having troubles displaying the number after Picture2ID= in the URL, am I right? Quote Link to comment https://forums.phpfreaks.com/topic/84683-solved-prev-next/#findComment-431566 Share on other sites More sharing options...
phpSensei Posted January 6, 2008 Author Share Posted January 6, 2008 Here is the site http://www.render-works.com/clients/solo_client0001/index.php As you can see the previous, and next button arent working, but i am trying to code it. I already coded this, where it goes to the next record in the data, I just got the highest id, and lowest one, and put it in a LIMIT, but what if its Id: 1 2 5 6? Because the next button is always +1. As you can see, I can't find any other ways of doing this... Help? So you're having troubles displaying the number after Picture2ID= in the URL, am I right? No, that was some leftover of my coding, messed it up... lol I see this is just a simple pagination. Thankyou. Quote Link to comment https://forums.phpfreaks.com/topic/84683-solved-prev-next/#findComment-431568 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.