Retrieving data from the database in parts

The question was asked: 6 years 11 months ago   views: 17

As far as I know mysqli has two ways to use SELECT queries: when data from a given database from the crowd, and when the cache data stored in the database and is given in parts. Mysqli not directly used - worked with a class wrapper around this module and didn't pay attention. Decided to poke with PDO - arose immediately the problem of obtaining large amounts of data. overflow error reserved seats to the script. I would like to know how to implement getting data from the database in parts. If someone starts to offer alternatives - just say that I know (the easiest way is to change the logic so that would not work with this amount of information), so I would like to answer the question with my preference.

Asked: angry angry 21-06-2012 в 18:50:28
The option for select * from somethink limit x,n where x = i*n and processing it in a loop you see as the alternative? - Чад Чад 21-06-2012 в 21:33:28

Answers   1


It seems to me that You will help setFetchMode(PDO::FETCH_LAZY) ?

Read more in the manul

Answered: Чад Чад 21-06-2012 в 21:45:41