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 with memory and the program does not run as it should ...
I found a temporary solution, which is to increase the ini_set ("memory_limit", "256M"), which I believe is not correct ...
I thought of a way to do a SELECT and from this, make other SELECT'S using LIMIT, hence I believe it would be a perfect solution to my problem, as the script would not burst the memory .... >
But I have no idea how to do it ... How can I do this magic in this script ????