Solution to Activity 3.2
The solution for the activity is as follows:
- Open a SQL tab and run the following command to fetch the ID of the new member:
SELECT ID FROM members where 'Surname' = "Pettit"
- Execute the SQL statement by clicking the lightning bolt icon:
Figure 16.20 – SQL to extract the user ID of a member by surname
You should get the following output:
Figure 16.21 – The ID for the user Pettit
- Download the image from GitHub and add it to the
Members/Photos
folder. Add your member ID to the name of the image. The folder should look like the following:
Figure 16.22 – The updated Photos folder
- Create a script in a new SQL tab to update your record with the image and path:
UPDATE 'members' SET PhotoPath = "Members\\Photos\\MemberPhoto_2.jpg" WHERE 'ID'=2;
- Execute the SQL...