0
I have a routine that starts with a SELECT, and from this I trigger an email for each record found. The problem is that if I have more than 3,000 records, my program is bursting memory and the program does not run as it should...
I found an interim solution, which is to increase the ini_set("memory_limit","256M"), which I believe is not correct...
I thought of a way to make a SELECT and from this, do other SELECT’S with use of LIMIT, then I believe it would be a perfect solution to my problem, because the script would not burst memory....
I just have no idea how to do... How can I do this magic in this script????
Sends 10 emails every 2 minutes...
– Diego Souza
In the company that I work when I send a lot of emails at once it happened, the solution we created was to shoot 40 in 40 emails. we created an auxiliary array for triggering. Every 40 emails were sent from this array and it was clean. try
– Marconi
Marconi, I do + or - this, in my SELECT in a specific field, it brings me a set of numbers separated by " ; "and by it I make an array and make a foreach to pick number by number to be sent the email.... Dai how can I make this foreach scheme loop and 40 numbers wait a certain time and then continue ???
– J. Silva