Closed gseals closed 4 years ago
update your own databases with these lines:
UPDATE Stash
SET Stash.CandyId = 6
WHERE Stash.StashId = 6
INSERT INTO Candy VALUES('Reese', 'Hershey', 5, '2020-05-19', 0, 1)
INSERT INTO Candy VALUES('Reese', 'Hershey', 5, '2020-05-19', 1, 1)
INSERT INTO Candy VALUES('Reese', 'Hershey', 5, '2020-05-19', 0, 1)
INSERT INTO Candy VALUES('Reese', 'Hershey', 5, '2020-05-19', 0, 1)
this query returns all candies by owner that have not been eaten
SELECT
Candy.CandyId,
Candy.[Name],
Candy.Manufacturer,
Candy.FlavorId,
Candy.DateCollected,
Candy.Ate,
Candy.StashId
FROM Candy
JOIN Stash ON Stash.StashId = Candy.StashId
JOIN [User] ON [User].Uid = Stash.UserId
WHERE Candy.Ate = 1 AND [User].uid = 1
ORDER BY Candy.DateCollected, Candy.StashId
[x] As a candy owner, I want to be able to keep track of the candy that I receive
[x] As a candy owner, I want to be able to keep track of the candy that I eat