Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old July 14th, 2002, 09:17 AM
chobo4ever chobo4ever is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Vienna, Austria
Posts: 63 chobo4ever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
having a logical problem

hi,
I have a newsletter system. right now there are only 3 newsletter saved in the db but I hope they´ll get 200 or more. Everyone subscribed can choose to get previous newsletters sent. what I want to do is mark every user every time he gets a newsletter. So I could see which users have never gotten a letter, which only the 3rd and so on ...
making for every newsletter a column in every user table is no solution, since the table would get very large. writing the ids of the newsletter in one yolumn, seperated ba a "," is not so good either.

so is there a solution? maybe making a new table just for marking? please help,
thx

Reply With Quote
  #2  
Old July 14th, 2002, 10:21 AM
CmdrDats CmdrDats is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: <br><img src='http://www.dats.co.za/icon.gif'>
Posts: 269 CmdrDats User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to CmdrDats Send a message via AIM to CmdrDats Send a message via Yahoo to CmdrDats
RE: having a logical problem

Well, can you assume that a user has already been sent all newsletters after he subscribed? That means you only need to check if the date that the newsletter has been sent is after the date that the person subscribed and before he unsubscribed..

Then, for previous newsletters you simply have a newsletter->user linking table that looks something like :

newsletter_received
id
userid
newsletterid

And you only write into it if users want a old newsletter sent to them.. That means the linking table won't get too big either.

Just an idea..

Reply With Quote
  #3  
Old July 14th, 2002, 07:48 PM
chobo4ever chobo4ever is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Vienna, Austria
Posts: 63 chobo4ever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: having a logical problem

hmm, seems logical enough to me.
thanks

Reply With Quote
  #4  
Old July 25th, 2002, 04:02 PM
sudheeer_yakkala sudheeer_yakkala is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 sudheeer_yakkala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: having a logical problem


Quote:
hi,
I have a newsletter system. right now there are only 3 newsletter saved in the db but I hope they´ll get 200 or more. Everyone subscribed can choose to get previous newsletters sent. what I want to do is mark every user every time he gets a newsletter. So I could see which users have never gotten a letter, which only the 3rd and so on ...
making for every newsletter a column in every user table is no solution, since the table would get very large. writing the ids of the newsletter in one yolumn, seperated ba a "," is not so good either.

so is there a solution? maybe making a new table just for marking? please help,
thx


Hi,
Try this way.

If i am sure, you are maintaining a seperate table for newsletter details and user details.

Now take another relation table like
'NewsletterUser' that stores information 'seqNewsletterId' and 'seqUserId'

i.e the table structure will be like this
CREATE TABLE newsletterreceiver(
seqnewsletterreceiverId,

seqNewsLetterId,
seqUserId,
...
...
..
);

When a user requests a newsletter, his Id as well as the newsletter Id (requested) is stored in this table.


Now if you want to find the users that didn't received any newsletter, You can write your logic such as:
Get all the users from user table whose ids are not in the 'newsletterreceivers'
Where seqNewsLetterId = 'x'

Hope this solves your problem.

You can contact me at sudheer_yakkala@yahoo.co.in




Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > having a logical problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway