CincoPistolero Posted December 30, 2009 Share Posted December 30, 2009 I want to create a menu like below << previous next >> where '<<' takes us to first record in array and 'previous' only goes back one. 'next' goes forward one and '>>' goes to end of array. I've been trying to google search for examples, but I'm not sure what to google. Does anyone know what this logic is called, or know of any examples of doing this. Quote Link to comment https://forums.phpfreaks.com/topic/186724-menu-not-sure-what-type-it-is/ Share on other sites More sharing options...
premiso Posted December 30, 2009 Share Posted December 30, 2009 You want to look into Pagination. A decent tutorial can be found here. Quote Link to comment https://forums.phpfreaks.com/topic/186724-menu-not-sure-what-type-it-is/#findComment-986075 Share on other sites More sharing options...
CincoPistolero Posted December 30, 2009 Author Share Posted December 30, 2009 I went to the link provided in the last post, and it worked seemlessly. My only question is, if I want to make sure that the most recent record seen is no later than TODAY'S date, how would I go about that? Currently, the code loads all records in the table. $query = "SELECT COUNT(*) FROM table"; Can I make that only select records up to today? I do have a column that caputures 'date' for each record. Quote Link to comment https://forums.phpfreaks.com/topic/186724-menu-not-sure-what-type-it-is/#findComment-986160 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.