Created
April 4, 2013 19:04
-
-
Save telagraphic/5313193 to your computer and use it in GitHub Desktop.
two tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workouts | |
________ | |
id | |
date | |
reps | |
desc | |
exercise_id | |
exercise | |
________ | |
id | |
type | |
when inserting into workouts table, how would i reference the corresponding exercise id without typing the id into my insert? | |
instead of putting 1 or 3 in the workouts foreign key column(exercise_id), i would put the type of exercise that would match in the exercise table. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment