PHP SELECT user data?

LOL

New member
Ok here is the situatation,

I have three tables set up;

'Users'
'Profile'
'Linkingtbl'

The 'Users' table holds the following data;
Email (PK)
Password

The 'Profile' table holds the following data;
ProfileID (PK)
Firstname
Lastname
DOB

The 'Linkingtbl' table holds the following data;
ID (PK)
Email (FK)
Password
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?

Thanks
 
Back
Top