[thelist] Access DB design troubles

Daniel Barker DBarker at uk.insight.com
Thu Jul 17 10:42:25 CDT 2003


bit of pseudo that might help.

query1: select * from CUSTOMERS where UserID = AnyUserID

if query1.ReferralID != null
{
 query2: select * from CUSTOMERS where UserID = query1.ReferralID
}



-----Original Message-----
From: burgan at iprimus.com.au [mailto:burgan at iprimus.com.au]
Sent: 17 July 2003 16:08
To: thelist at lists.evolt.org
Subject: [thelist] Access DB design troubles


Hello,

I'm trying to design an Access DB that will hold customer details.
My problem is that I want to hold details of who referred each customer,
where each referred is a customer that is currently on the database.

I don't know how I go about doing this without duplicating information.

Here's my CUSTOMERS table.

---------
*UserID (autonumber)
FirstName
LastName
CompanyName
Address1
Address2
City
State
PostCode
Country
Phone
Fax
Email
Username
Password
ReferralID
---------

The last field 'ReferralID' I planned for the Data Type to be a number. I'm
stuck!! 

I want plan to use ASP to manage this DB. The user enters their details in
an ASP page (including the name of who referred them), the DB is then
searched for the referrers name and places their UserID into the new users
ReferralID field. Will that work?

On 1 ASP page, will I be able to see the details of 1 user, plus ALL the
details of the user that referred them just by knowing their ReferralID.

I'm totally lost, I'd appreciate as much help as possible.

Thanks
Tim

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

Evolt.org conference in London, July 25-27 2003.  Register today at
http://evolt.org.uk

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list