Re: Is it possible??
Date: 2000/06/06
Message-ID: <393ce52b.1117332_at_news.demon.co.uk>#1/1
I take it you are trying to achieve the following tables and relationships.
Table 'Users':
UserNo (key) [1:1 -> UserInfo.UserNo] <Detail fields>
Table 'UserInfo'
UserNo (key) [1:1 -> Users.UserNo] UserRef [1:1 -> Users.UserNo] <Detail fields>
If so, there should be no problem at all - except for the first user, unless you allow signup without needing a reference from another user (field UserInfo.UserRef). The relationships refer to the same (Users) table but to different _data_ and that is the important factor.
Note that you cannot link from Users.UserNo to _both_ UserInfo.UserNo and UserInfo.UserRef. That has implications for finding referrals, since you need to query the UserInfo table and user its references, not the Users table and its.
On Mon, 05 Jun 2000 03:33:09 GMT, "David" <wilsonda_at_home.com> wrote:
> I am in the midst of laying out the structure for a database that revolves
>around a multi level marketing strategy similar to that of "All
>Advantage's". When Users sign up, they are given a User # in the UserInfo
>Table, and then in a related table, the UserLevel table, that same user# is
>associated with the User they signed up under.
>
>The difficulty I think I might have is that in the UserLevel Table, the
>user# exists twice, once as the primary key (the user), and again to
>reference whom that user signed up under. The user's are related to one
>another. as an example, If one of you signed up under me (because I referred
>you to the service), i could have User # 1, and you are User #2, In one
>table, User#1 and User#2 are in seperate fields, but exist in the same
>table. How can i use two different fields in the same table to reference
>back to the UserInfo table? Is it possible to have two fields of one table
>referring back to a single field in another table?
-- Mark A Preston BSc, FIAP The Magpie's Nest mark_at_mpreston.demon.co.ukReceived on Tue Jun 06 2000 - 00:00:00 CEST
