nathan1 Posted February 8, 2009 Share Posted February 8, 2009 Hi Guys, i want to echo titles from the database and have a limit of 6, but when i click next i want to be able to go through extra titles in the database - is that possible ? appreciate any help, cheers Link to comment https://forums.phpfreaks.com/topic/144290-solved-navigation/ Share on other sites More sharing options...
bubbasheeko Posted February 8, 2009 Share Posted February 8, 2009 Yes it is possible. Do something like this: SELECT * FROM `table` LIMIT 0, 6 -> Gives you records 1-6 You will need to develop a counter or something along those lines....for example...you have something to add one to the last record count (6 + 1 = 7) and another for the last record to grab so for you (7 + 6 = 13). You would use these results to get your next query. SELECT * FROM `table LIMIT 7, 13 -> Gives you the next record (7) plus 6 (13). Link to comment https://forums.phpfreaks.com/topic/144290-solved-navigation/#findComment-757223 Share on other sites More sharing options...
genericnumber1 Posted February 8, 2009 Share Posted February 8, 2009 Google "php pagination". There's a good tutorial on this site, and hundreds others out there as well. Link to comment https://forums.phpfreaks.com/topic/144290-solved-navigation/#findComment-757231 Share on other sites More sharing options...
parodys Posted February 8, 2009 Share Posted February 8, 2009 i was looking for the same thing... check this out http://nettuts.com/tutorials/php/how-to-paginate-data-with-php/ Link to comment https://forums.phpfreaks.com/topic/144290-solved-navigation/#findComment-757337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.