diff --git a/html/api/workout.php b/html/api/workout.php index 8ed644d..a4bf164 100644 --- a/html/api/workout.php +++ b/html/api/workout.php @@ -13,7 +13,7 @@ if (isset($_GET['token'])){ $userID = $userData[0]['user']; if(isset($_GET['workout'])){ - $sql = "SELECT exercises_in_workout.id, name, description, amount, type, unit FROM exercises_in_workout inner join workout_types on workout_types.id=exercises_in_workout.workout_type inner JOIN workout_type_measurements on workout_type_measurements.id=workout_types.measurement where exercises_in_workout.workout_routine=?"; + $sql = "SELECT exercises_in_workout.id, name, description, amount, type, unit FROM exercises_in_workout inner join workout_types on workout_types.id=exercises_in_workout.workout_type inner JOIN workout_type_measurements on workout_type_measurements.id=workout_types.measurement where exercises_in_workout.workout_routine=? order by exercises_in_workout.id asc "; $stmt = $pdo->prepare($sql); $stmt->bindParam(1, $_GET['workout']); if ($stmt->execute()){