Ok here is the situatation,
I have three tables set up;
The 'Users' table holds the following data;
- Email (PK)
The 'Profile' table holds the following data;
- ProfileID (PK)
The 'Linkingtbl' table holds the following data;
- ID (PK)
- Email (FK)
- ProfileID (FK)
I have a login system setup and want to be able to show the users 'ProfileID'.
The problem that I have is that I also have a select system setup and it is just selecting the first 'ProfileID' in the table and not the 'ProfileID' that is related to the user.
How can I do this?
Do I need to use a 'WHERE' statement?