473,473 Members | 1,994 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need help linking userID fields

3 New Member
I am creating a massive website for my Residence Life Department, using MS SQL as its backbone and PHP as the interface.

The part I need help with-

I have a user table with a lot of user info id, name, password, etc. It also contains a jobTitle field. For instance someone can log in who is a HD (Hall Director) who is incharge of an entire building. Now I have a seperate Table named HD with 2 Fields ID and ACID (AC is for Area Coordinator someone in charge of a group of buidlings).

I want to be able to assign an auto generated ID to the HD table that will link to the specified user from the USER table, without putting a seperate field in the USER table. Why I want to do this is because I will have forms that are linked through many foreign keys and joins that refer back to these two ID's, but the person can switch buildings from year to year which then I would generate a new ID for them all without having to create a new USER table entry for them.
Aug 9 '07 #1
1 1214
azimmer
200 Recognized Expert New Member
I am creating a massive website for my Residence Life Department, using MS SQL as its backbone and PHP as the interface.

The part I need help with-

I have a user table with a lot of user info id, name, password, etc. It also contains a jobTitle field. For instance someone can log in who is a HD (Hall Director) who is incharge of an entire building. Now I have a seperate Table named HD with 2 Fields ID and ACID (AC is for Area Coordinator someone in charge of a group of buidlings).

I want to be able to assign an auto generated ID to the HD table that will link to the specified user from the USER table, without putting a seperate field in the USER table. Why I want to do this is because I will have forms that are linked through many foreign keys and joins that refer back to these two ID's, but the person can switch buildings from year to year which then I would generate a new ID for them all without having to create a new USER table entry for them.
I suggest you either add the USER_ID to the HD table or set up a new "connection table" with two columns: USER_ID and HD_ID
Aug 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Phil S | last post by:
I used the Migration Workbench for Oracle 9.2 Client to migrate the tables in an Access 2K back-end database to Oracle. (The Migration Workbench is intended to automate the process of migrating...
0
by: Pat Sagaser via .NET 247 | last post by:
I'm using a repeater with a dynamic template. I don't know the fields to display (or how many) until runtime. I have everything working except for linking Button events to the repeaters ItemCommand...
3
by: Larry Woods | last post by:
I have a datagrid that is carrying all fields of a record...except one. Now I want to update the underlying database via a dataadapter. The update is working but the field that is "left out" is...
2
by: VB Programmer | last post by:
I have a table called 'MyUsers'. Some fields are as follows: UserId (p key to tie it to aspnet_Users), MyAddress, MyCity, MyState, etc... After I do a Membership.CreateUser to add the new member...
0
by: Mary | last post by:
I have a main form with one subform that is used to record test scores. The main form has the following fields: WratStudentID ( a combo box with 2 fields - student id and student name - . Stores...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
1
by: CoolBreeze812 | last post by:
Hi, I need help with a query and I'm having trouble getting it formed correctly. I have 3 tables: users, authorization_users, and reports. The user table contains a bunch of users with fields...
1
by: mantrid | last post by:
I have two select statements below, that I wish to combine into one SELECT cgttransactions.linkid, cgttransactions.userid, cgttransactions.myvarid, cgttransactions.companyid,...
4
by: sjohnson1984 | last post by:
Hello all, I have a form which is generated using a database query - the recordset is filled with agent details, login time and the like, and there are as many rows in the table as records in the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.