Newsletter Software Database Solutions - MySQL & PHP -
I've recently created a newsletter application which allows you to subscribe to different categories of users newsletter. I have some tablets like the following tables designed.
Category Table: ID CNN Description ...
Customer Table: ID Snom Category_ID ...
Newsletter Table: ID Nname Content .. .
The table category_newsletter: ID newsletter_id category_id
If the manager creates a newsletter, then some categories will be selected. It category_newsletter like the table, is done by,
category_newsletter table: ID newsletter_id category_id
Everything so far is going well. But the question is, what kind of classes do send newsletters to the customers? I have a solution, but I do not know, so it's okay.
I have another table called the design "Newsletter_queue" When the manager makes a newspaper and selects some categories, for example "CakePHP" category, then all clients in the system "CakePHP Series" Selection and filing "email", filed in the "subscriber_id" "newsletter_queue" table, so that the system has enough power to handle the process of sending e-mail but the manager can also stop sending.
So, does anyone have some experience in newsletter core databases? Talk about it. thank you in advanced!
Category Table: Category Name Description ... Subscriber table: Subscriber ID name subscription list : SubscriberId CategoryID Newsletter table: NewsletterId name content ... CategoryNewsletter table: NewsletterId CategoryID NewsletterQueue table: SubscriberId sent NewsletterId ...
you do not need additional ID column category_newsletter. You can create a primary key that combines both the newsletter ID and the Cdd and it should be enough.
Customers table should be divided into two tables. You must have a Subscriber table with the customer ID and name included. A second table for membership, which is the customer ID and category ID, a user can subscribe to many categories as you said.
In order to send newsletters to the selector, it also needs to be sure that you get different email addresses, because it seems that a user can sign up for multiple categories and Many categories can be appointed for the newsletter.
If a user follows categories A and B and creates a newsletter for Manager A and B. If you select only all users who subscribe to the selected categories, then this is twice Once the user will come back twice to the category they follow.
NewsletterQueue (SubscriberId, NewsletterId) Insert selected SubscriptionTable inner quality s.SubscriberId, cn.NewsletterId Join CategoryNewsletter s.CategoryId = cn.CategoryId where cn.NewsletterId = on cn [X]
Comments
Post a Comment