Reap38 Posted July 26, 2016 Share Posted July 26, 2016 Say i have 8000 IDs and I start from the 1st id and count down in a while loop..but say i can only count down 3000 rows of ids before its empty..so i saved the last id that got filled.but how can i start from the row where i left off to fill the rest of the 8000 i only filled 3000so now i need to select row line 3000 and count down again to the end of the row unless empty then save the last id filleddid that make sense? Quote Link to comment https://forums.phpfreaks.com/topic/301641-start-from-row-to-end-of-row/ Share on other sites More sharing options...
maxxd Posted July 26, 2016 Share Posted July 26, 2016 did that make sense? Sorry, but no. Are talking about an auto-increment type situation or result set pagination? Or something else entirely? Quote Link to comment https://forums.phpfreaks.com/topic/301641-start-from-row-to-end-of-row/#findComment-1535085 Share on other sites More sharing options...
cyberRobot Posted July 26, 2016 Share Posted July 26, 2016 Are you getting the information from a MySQL database? If so, you could indicate an offset and the number of rows you want in the LIMIT clause. More information can be found here: http://dev.mysql.com/doc/refman/5.7/en/select.html Of course, you would need to figure out what that offset should be. You could determine that using the number of results per page (3000) and a variable that indicates which page the user is on...assuming that you are talking about a pagination script. Quote Link to comment https://forums.phpfreaks.com/topic/301641-start-from-row-to-end-of-row/#findComment-1535086 Share on other sites More sharing options...
Reap38 Posted July 27, 2016 Author Share Posted July 27, 2016 (edited) lets say this: rowsid=100 id=101 id=102 id=103 we are in a while loop we have $1000.00 and want to share with all members 50% of teh 1000.00so id = 100 gets 500.00and id = 101 gets 500.00we need to remember last paid member so we store id = 101we now need to run the script again because we earned 1000.00 more to share to th other two membersso the script needs to know to start at row id=102how ever thats a small version of the percentage of the shares and member count we have 13k members now. so the row count is 13k rowsI will hire someone to come check this out and help me out to get this script working. Edited July 27, 2016 by Reap38 Quote Link to comment https://forums.phpfreaks.com/topic/301641-start-from-row-to-end-of-row/#findComment-1535115 Share on other sites More sharing options...
Barand Posted July 27, 2016 Share Posted July 27, 2016 Use your table of member payments so you know which ones have been paid and when. Quote Link to comment https://forums.phpfreaks.com/topic/301641-start-from-row-to-end-of-row/#findComment-1535118 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.