kozmk Posted May 3, 2008 Share Posted May 3, 2008 hey guys, I'm trying to script my own blog, but I have a problem. On the homepage I got the script to show the last 5 post that have been made, but now I want to show "older" post so it I need a page that skips the first 5 post and shows the next 5 post. How can I get this info out of mysql ? thanks Link to comment https://forums.phpfreaks.com/topic/103988-php-blog-mysql-select-problem/ Share on other sites More sharing options...
bravo81 Posted May 3, 2008 Share Posted May 3, 2008 Can you explain that a bit clearer please? Link to comment https://forums.phpfreaks.com/topic/103988-php-blog-mysql-select-problem/#findComment-532349 Share on other sites More sharing options...
kozmk Posted May 3, 2008 Author Share Posted May 3, 2008 on my home page "index.php" i show my latest 5 posts, so now i want to make a link on the bottom of the page to go to a next page "index.php?page=1" where i want to show the next 5 posts, so i need to select from 6th to the 10th post, but i dont know how i can skip the the first 5 when i use the select from sql code Link to comment https://forums.phpfreaks.com/topic/103988-php-blog-mysql-select-problem/#findComment-532351 Share on other sites More sharing options...
Gamic Posted May 3, 2008 Share Posted May 3, 2008 You will want to use limit {start row}, {number of rows to retrieve}. select something from table order by something limit 6,5; would retrieve results 6 - 10. Link to comment https://forums.phpfreaks.com/topic/103988-php-blog-mysql-select-problem/#findComment-532395 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.