What I want to do is display the routineName and description when the user logged into my system based on what they userID or username is.
I have 3 tables in mySQL database user userid name username password
Routine RoutineID RoutineName Description
UserRoutines UserRoutinesID userid RoutineID
This is my Query So far
SELECT routine
.RoutineName
, routine
.Description
FROM user_routines
, routine
, userdetails
Where 'user_routine'.'userid' = 'user'.'userid'
AND 'user'.username = username = ?; (? is the variable passed from the application)