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:
  #1  
Old July 14th, 2002, 10: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: 3
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, 11: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: 3
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, 08: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: 3
RE: having a logical problem

hmm, seems logical enough to me.
thanks

Reply With Quote
  #4  
Old July 25th, 2002, 05: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!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek