Lay of the land:
I have an app for users to log exercise activities for a particular challenge they are enrolled in. The app consists of the following tables:
There are references between some of the tables:
User Stats > Users on User ID
Challenge_Exercises > Exercises on Exercise ID
Challenge_Exercises > Challenges on Challenge ID
Challenge_Users > Users on User ID
Challenge_Users > Challenges on Challenge ID
All of the activities get logged to the Exercise_Entry table which is currently set up with the Challenge ID, User ID, and Exercise ID (among other) fields.
I need to get the Challenge ID, User ID, and Exercise ID copied to the Challenge_Progress table.
The catch, I only want ONE UNIQUE record in the table for a given Challenge ID, User ID, Exercise ID.
The challenge_user table is designed to store total complete reps by a given Challenge ID, User ID, and Exercise ID. This will drive some charting and other information displayed on the dashboard.
I am struggling to figure out how to perform the lookup with all of those IDs against that table to determine if that “key” exists. FYI I do have a column on that table to store that “key”
let me know if you need more information or detail