ELD
May 12th, 2009, 03:17 PM
Basically on my script i am coding an option to email inactive members.
I currently have this:
$sql_find = "SELECT `username`, `email` FROM `members` WHERE `last_active` < $inactive_time AND `member_id` != 2";
$query_find = $db->query($sql_find);
while ($info = $db->fetch_array($query_find))
{
}
I was thinking to add a email inside the while loop but then it will use the email function for every single member, it would be better on the systems resources to use one mail function and cc all the emails right?
But then if i do it that way it can only be a generic email as i won't be able to change the username displayed in the email as it will just be sending to all.
I currently have this:
$sql_find = "SELECT `username`, `email` FROM `members` WHERE `last_active` < $inactive_time AND `member_id` != 2";
$query_find = $db->query($sql_find);
while ($info = $db->fetch_array($query_find))
{
}
I was thinking to add a email inside the while loop but then it will use the email function for every single member, it would be better on the systems resources to use one mail function and cc all the emails right?
But then if i do it that way it can only be a generic email as i won't be able to change the username displayed in the email as it will just be sending to all.