help with mailing list
Moderator: General Moderators
-
ferio-moreno
- Forum Commoner
- Posts: 30
- Joined: Tue Feb 28, 2006 10:31 pm
- Location: florida
help with mailing list
Hiya,
My new project at work is to design a mailing list for the employees. I've got that all done, but now, he wants me to:
Have the php script be initiated every 30 seconds, and each time its initiated to startup after the previous queue (not include the members who hav already been added to a list to be emailed).
How would you folks go about doing this, I don't think i'll need a code example, just a detailed description.
My new project at work is to design a mailing list for the employees. I've got that all done, but now, he wants me to:
Have the php script be initiated every 30 seconds, and each time its initiated to startup after the previous queue (not include the members who hav already been added to a list to be emailed).
How would you folks go about doing this, I don't think i'll need a code example, just a detailed description.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: help with mailing list
Keyword: CRONferio-moreno wrote:Hiya,
My new project at work is to design a mailing list for the employees. I've got that all done, but now, he wants me to:
Have the php script be initiated every 30 seconds, and each time its initiated to startup after the previous queue (not include the members who hav already been added to a list to be emailed).
How would you folks go about doing this, I don't think i'll need a code example, just a detailed description.
Google it
-
ferio-moreno
- Forum Commoner
- Posts: 30
- Joined: Tue Feb 28, 2006 10:31 pm
- Location: florida
- aerodromoi
- Forum Contributor
- Posts: 230
- Joined: Sun May 07, 2006 5:21 am
Why don't you use a two-dimensional array (email address and whether the mail has been sent or not)?ferio-moreno wrote:i already know about CRON, but before I do that,
Is there way to compare values between 2 lists?
who i have sent to, and who i am going to send to?
eg.
Code: Select all
$list = array(
array("user01@emailaddress.com",true),
array("user02@emailaddress.com",false),
array("user03@emailaddress.com",false)
);- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Use a database. Create a new recordset for each mail you're sending, store the addresses in another table and store the link between the two in a third table. Set a flag to "yes" when a mail has been sent to any of the users. If you work through the database in a sortable order each time you do this you should be able to pick up where you left off each time.ferio-moreno wrote:i already know about CRON, but before I do that,
Is there way to compare values between 2 lists?
who i have sent to, and who i am going to send to?
-
ferio-moreno
- Forum Commoner
- Posts: 30
- Joined: Tue Feb 28, 2006 10:31 pm
- Location: florida
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Limit to 30 resultsferio-moreno wrote:awesome, thx alot bro,
quick question though, is there a way to screw around with the SELECT statement to say select 30 records at a time?
Code: Select all
select
whatever
from
wherever
limit 30Code: Select all
select
whatever
from
wherever
limit 60, 30-
ferio-moreno
- Forum Commoner
- Posts: 30
- Joined: Tue Feb 28, 2006 10:31 pm
- Location: florida