views:

10

answers:

0

Hi,

My website allows for anonymous sign-up of a mailing list. The same mailing list is also sent out to registered users.

The problem is when the anonymous user transitions to a registered user --- I don't want to spam the same email address twice.

My user table is as follow:

CREATE table users (

user_id  integer not null primary key,
email varchar(100) not null unique,
first_name varchar(100) not null,
last_name varchar(100) not null,
dont_spam_me_p char(1) default 'f' check (dont_spam_me_p in ('t','f')),
password  varchar(30) not null,
registration_date timestamp(0),
registration_ip  varchar(50) 

);

So how should I go about defining the mailing_list table?