I have a very simple script that selects users from a database and mails out an announcement.
$sql = mysql_query("SELECT * FROM users WHERE removed='N'");
while($row = mysql_fetch_array($sql)){
//mail parameters here
}
exit ();
Problem is, the database is getting quite large now. What do I need to do (or is it even possible) to "pause" say after a batch of 50 emails has been sent out before sending the next 50, then the next 50 etc so not to overload the server?
Any help appreciated!
😃