Last post May 03, 2005 05:11 PM by eveningstar
Apr 01, 2005 05:57 AM|HUNGSTER|LINK
My problem is that I can use the same email address to register a new user.
Shouldn't the email address of a customer be the primary key in the Customer table instead of CustomerID?
On the demo website you cannot register a new customer if the customer's email has already been registered.
Apr 01, 2005 08:35 PM|HUNGSTER|LINK
I just found a way around the problem. Create a stored procedure that will check to see if the email has been registered by another user. If the email already exists, inform the user about it. If the email has not been registered, then execute the code
to add the customer.
May 03, 2005 05:11 PM|eveningstar|LINK
This is a good question. When I changed my email address when I went broadband I found that it was just about impossible to change my registration details on many sites. It must be a good idea to generate a unique primary key such as CustomerID in this instance
and then maybe enforce a Unique constraint on the column holding email addresses.