Jump to content
MakeWebGames

Recommended Posts

Posted

i iplimented a new mail system and it fits mostly with my game but the mass mail n gang mails wernt showing up as a new mail

so i looked at them and saw i had to add $db->query("UPDATE users SET new_mail=new_mail+1"); but now it says i have 198 mails when i mass mail or gang mail

any help would be good

Posted

You have to put that statement inside the while loop: Heres the example. That way it only credits the gang member one time for each mass mail.

 

$q=$db->query("SELECT * FROM users WHERE gang={$ir['gang']}");
while($r=$db->fetch_row($q)) {
 	//insert into mail statment.
 	$db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$r['userid']}");
 	print "Mass mail sent to {$r['username']}.
";
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...