Could anybody please help with a problem I have regarding extracting data from 2 tables.
I am trying to build a database that will allow users to complete their details to enter an event. The way I would like it to work is for the user to register their personal details on the database including a username and password (the username would be the primary key). After they have completed the initial registration, on subsequent visits to the database they can simply enter their username and password to log in.
From the log in area, the user has a choice of events to enter, they select the appropriate event and then complete some additional information through a form.
The problem I have is how can I join the registration details table to the events table without the user having to complete the username details in the events table. What I would like is for the username field to be automatically inserted (to enable me to relate the 2 tables) into the events table. Is this possible and how would I go about setting this up.
The registration table would have the following fields:-
first name
surname
username (primary key)
password
email address
The events table would have the following fields:-
event name (primary key)
date of event
arrival time
special requirements
username (auto inserted from users log in details)
The resulting query would need to include all of the above in both tables and would show which events a user has entered. A user would not be allowed to enter the same event more than once.
Many thanks in anticipation.
I am trying to build a database that will allow users to complete their details to enter an event. The way I would like it to work is for the user to register their personal details on the database including a username and password (the username would be the primary key). After they have completed the initial registration, on subsequent visits to the database they can simply enter their username and password to log in.
From the log in area, the user has a choice of events to enter, they select the appropriate event and then complete some additional information through a form.
The problem I have is how can I join the registration details table to the events table without the user having to complete the username details in the events table. What I would like is for the username field to be automatically inserted (to enable me to relate the 2 tables) into the events table. Is this possible and how would I go about setting this up.
The registration table would have the following fields:-
first name
surname
username (primary key)
password
email address
The events table would have the following fields:-
event name (primary key)
date of event
arrival time
special requirements
username (auto inserted from users log in details)
The resulting query would need to include all of the above in both tables and would show which events a user has entered. A user would not be allowed to enter the same event more than once.
Many thanks in anticipation.