JustGotAQuestion Posted April 24, 2008 Share Posted April 24, 2008 I want to make a page that calls 10 results from a database, one after another. I want page numbers at the bottom (if there are more than 10 results) so that clicking page [2] will give you the next 10 results. I know this has got to be a very common thing to do, so if you don't feel like explaining, can you link me to a good tutorial? Thanks Link to comment https://forums.phpfreaks.com/topic/102819-solved-seperate-results-into-pages-php-question/ Share on other sites More sharing options...
Spaceman-Spiff Posted April 24, 2008 Share Posted April 24, 2008 The key is using LIMIT x, y - where x is the row start, and y is the row amount per page. Example: - for page 1: SELECT * FROM tablename LIMIT 0 , 30 - for page 2: SELECT * FROM tablename LIMIT 30 , 30 - for page 3: SELECT * FROM tablename LIMIT 60 , 30 Link to comment https://forums.phpfreaks.com/topic/102819-solved-seperate-results-into-pages-php-question/#findComment-526680 Share on other sites More sharing options...
JustGotAQuestion Posted April 24, 2008 Author Share Posted April 24, 2008 Nice! So I'll play around with that for a while. Sounds like thats all I need to get started. Thanks. Link to comment https://forums.phpfreaks.com/topic/102819-solved-seperate-results-into-pages-php-question/#findComment-526683 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.