kev wood Posted May 30, 2008 Share Posted May 30, 2008 i need to know if this code will work. the reason i am posting this before i test is because i have already killed an outlook inbox. I want the code to work by first querying a mysql table to retrieve some data. this data is then subtracted from the number 200 to leave a value for the variable $limit to hold. the variable limit is then used to stop the explode function from going over the allowed amount of emails to be sent. here is the first section of the code $query = "SELECT email_count FROM sent_messages"; $result=mysql_query($query); while($row=mysql_fetch_array($result, MYSQL_ASSOC)){ $sent_mail = $row['sent_messages']; } $limit = 200 - $sent_mail; // construct mailing list array $merc_list = explode(",",$merc_mailingList, $limit); // deploy the emails for($i=0; $i<count($merc_list); $i++){ after the curly bracket the email is built using html. the next section of the code updates the table that was queried at the beginning. mysql_query =(UPDATE email_count SET sent_messages = $i); i killed the inbox by setting up a loop with a spelling mistake inside so it could never evaluate what i wanted it to. i have now deleted over 10,000 emails in three days. death to outlook! Quote Link to comment https://forums.phpfreaks.com/topic/108007-help-with-code/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.