Batch Coding Help Please

From: Date: Mon, 25 Jun 2001 11:10:29 +0000
Subject: Batch Coding Help Please
Groups: php.general 
Request: Send a blank email to php-general+get-55128@lists.php.net to get a copy of this message
Hi, I am building a custom e-mailer for one of my websites using PHP and MySQL, I know there are loads out there already but my goal here is to learn this coding myself so I can modify it to my needs as and when they change. My list only has around 5000 subscribers at the moment and I have heard that with large lists like this it is ideal to batch send the emails. So my question is how do you batch code? This is the code I have in place at the moment.... $query=mysql_db_query($dbase,"SELECT * FROM Subscribers, Members where Subscribers.ListID='$ID' and Members.MID=Subscribers.MemberID"); $num_rows=mysql_num_rows($query); for ($i=0; $i<$num_rows; $i++) { mysql_data_seek($query, $i); $array=mysql_fetch_array($query); $Email="$array[Email]"; mail($Email, $MsgTitle, "$Message\n\n\n$Content", $Header); }

« previous php.general (#55128) next »