I got a table whereby I want to select the data start from 1 until the next row value is 1. For eg:
Number Auto
1 10
2 11
3 12
4 13
1 14
2 15
1 16
1 17
2 18
3 19
4 20
5 21
based on the Number and Auto column, I wish to select Number start from 1. eg
First page select should be 1 to 4 ... when I click next
2nd click select would be 1 to 2
3rd click would be 1
4th click would be 1 to 5
How can I do the sql statement to select the condition above? Means select the value based on Number column and display the value from Auto column. Thanks~