Person, I have a problem. For example, I need to make a SELECT
in a huge table, and I want it to return rows in the range of 10 by 10.
For example: 1,2,3,4,5,6,7,8,9,10
to 11,12,13,14,15,16,17,18,19,20
,
and so on.
Case study:
I have a table of 500 thousand lines. I need this 500 thousand lines, only 1000 in 1000:
select * from tabela limit 1000 offset 0;
The range would be to stop at 1000, and then make another select starting at 1001 and going to 2000.
I just need to do this once in a PHP script.
It is more or less how to make a pagination more serious than being automatic, the select would have to execute that block from 1000 to 1000 until there are no more rows in the table