8
I’m a beginner in PHP and Mysql and need to know what I do to get all users registered in a database when the number of users reaches thousands?
I registered 300,000 users in my database and would like a way to get all of them without causing "Allowed memory size" in PHP. How to bring the results to pieces?
Paging.
– Jéf Bueno
Do you need all the data at once? for some report? or for display ? if display uses paging... for the memory problem you can increase in php.ini or even with ini_set('memory_limit', '64M') for example.
– Diego Braga
How can I paginate these results?
– rray
Do you really need to bring all the data from these users? A good practice is to bring only what is necessary. Avoiding "select * from". Now 300,000 users is really too big in my opinion for a PHP program. 1st tip: Do a database process to process in the database (It’s not cool anymore it takes the weight of PHP) 2nd tip: Change language to one that doesn’t wipe out the server memory and is more robust like C#
– Felipe