Jump to content

Multiple emails being sent


Drummin

Recommended Posts

Can anyone spot where my error is or why I might be getting multiple emails sent?

$getNEWid2 = mysql_query("SELECT ID FROM ".$conf['tbl']['users']." ORDER BY ID DESC LIMIT 1 ");	
WHILE ($NEWid2 = mysql_fetch_array($getNEWid2)){
$send = mysql_query("SELECT name,user,email from ".$conf['tbl']['users']." WHERE ID=$NEWid2[iD]");
   WHILE($newsiteuser = mysql_fetch_array($send)) {
//emails sent here//
}}

 

Link to comment
https://forums.phpfreaks.com/topic/236584-multiple-emails-being-sent/
Share on other sites

you could try debugging your queries...

$getNEWid2 = mysql_query("SELECT ID FROM ".$conf['tbl']['users']." ORDER BY ID DESC LIMIT 1 ") or die(mysql_error());	
WHILE ($NEWid2 = mysql_fetch_array($getNEWid2)){
$send = mysql_query("SELECT name,user,email from ".$conf['tbl']['users']." WHERE ID=$NEWid2[iD]") or die(mysql_error());
   WHILE($newsiteuser = mysql_fetch_array($send)) {
//emails sent here//
}}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.