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 Quote Link to comment 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). Quote Link to comment 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. Quote Link to comment 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/ Quote Link to comment 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.