-2
Person, I have a problem. For example: I need to make a SELECT
on a huge table, and I want you to return lines in the range of 10 in 10.
For example: 1,2,3,4,5,6,7,8,9,10
for 11,12,13,14,15,16,17,18,19,20
,
and so on.
Practical case:
I have a table of 500,000 lines. I need this 500,000 lines, only every 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.
Only I need to do it once in a PHP script.
is more like making a pagination more would be to be automatic, select would have to run that block from 1000 in 1000 until there are no more rows in the table
interval would be what? take a break of X seconds? Display each block of 10 in 10 without taking breaks?
– Daniel Omine
You may be talking about paging. http://answall.com/questions/26303/como-fazer-pagina%C3%A7%C3%A3o-php-e-mysql
– Wallace Maxters
Your question is missing useful information. Post the code of what you have tried to do, if you have.
– Wallace Maxters
LIMIT/OFFSET
if your bank allows or equivalent.– rray
Vinicius, you were the one who edited it into another account?
– user28595
I got that question because it was suggested to me in the analysis queue (in a test I was flunked out of once I voted to keep it open). The test tells me to stop, look and listen because the question has problems. Doing what was asked, the question in the current version does not seem to have understanding problems (and I understand very little of SQL). What the AP needs is to consult the lines slowly, in an informed quantitative range. @Wallacemaxters understood and even suggested a response about paging. If?
– Luiz Vieira