I have an SQL that brings back all the users of a system in a MySQL database with PHP and I need to get these users and move them to another system (don't worry about the fields, I already map them). The problem is that I have more than 67000 users in the database. Is there any way I can do that with PHP and get all the results at once?? Cause I tried and give me a error, not an error, but the PHP can't return all the results at once.
You probably have reached PHP's default memory limit. You have (at least) 2 options:
In both cases you might want to increase the time your script can run too. Have a look at max-execution-time.
http://nl3.php.net/manual/en/info.configuration.php#ini.max-execution-time
Put this on top of your PHP script: ini_set('memory_limit', '512M');
You can give the php script less that 512MB ofc
You can use limit in SQL
limit 0, 1000
limit 10001, 2000
etc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.