Jump to content

Recommended Posts

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 3000
so 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 filled

did that make sense?

Link to comment
https://forums.phpfreaks.com/topic/301641-start-from-row-to-end-of-row/
Share on other sites

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.

lets say this:

 

rows

id=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.00
so id = 100 gets 500.00
and id = 101 gets 500.00
we need to remember last paid member so we store id = 101
we now need to run the script again because we earned 1000.00 more to share to th other two members
so the script needs to know to start at row id=102


how 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 rows
I will hire someone to come check this out and help me out to get this script working. 

Edited by Reap38
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.