Copy link to clipboard
Copied
Does anyone if there is a method to split up results of a query based on a specific number to stop and split at?
For example, I want to pull out all of these numbers from my database....say 1 - 20. I want to show them on the page in order, but I would want to stop once I hit a preset number, say 12.5, then continue on. So I would need a way to show this:
My Numbers:
1,2,3,4,5,6,7,8,9,10,11,12,.5
Total equalling 12.5
Numbers after split:
.5,14,15,16,17,18,19,20
Total above 12.5
I'm basically adding numbers in my database, but need to cut it off at a certain predetermined point (in this example 12.5) and start the rest after that point.
Right now I'm using coding that tries to split the results from a users input and insert them into the database. I'm running into problems displaying that data correctly though. It seems it would make more sense to just input everything normally, then display everything and spit it there.
Any help in the right direction would be greatly appreciated. I'm stumped on this!
Copy link to clipboard
Copied
Query of Queries will probably work.
Copy link to clipboard
Copied
Hmmm, I'm doing some research on the Query of Queries, I'm not sure if that will work. I'm wondering how that method would know to split an entry in the db. Because if I wanted to stop at 12.5 it would actually have to split 13 in half and give .5 to the first section and .5 to the second section.