Changes between Version 3 and Version 4 of UseCase05PrototypeImplementation
- Timestamp:
- 02/07/26 21:03:39 (17 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UseCase05PrototypeImplementation
v3 v4 7 7 [[Image(mypets.png)]] 8 8 {{{ 9 SELECT 10 a.animal_id, 11 a.name, 12 a.sex, 13 a.date_of_birth, 14 a.type, 15 a.species, 16 a.breed, 17 a.located_name 18 FROM animals a 19 WHERE a.owner_id = (SELECT user_id FROM users WHERE username = 'client.mila') 20 ORDER BY a.animal_id DESC; 9 SELECT * FROM pet WHERE owner_id = ? 21 10 }}} 22 11 2. Clicks on the "Create Listing" button. … … 26 15 4. System creates the lisitng. 27 16 {{{ 28 INSERT INTO listings (owner_id, animal_id, status, price, description, created_at) 29 VALUES ( 30 (SELECT user_id FROM users WHERE username = 'client.mila'), 31 (SELECT animal_id 32 FROM animals 33 WHERE name = 'Max' 34 AND owner_id = (SELECT user_id FROM users WHERE username = 'client.mila') 35 LIMIT 1), 36 'ACTIVE', 37 45.00, 38 'A cute male puppy that it is already vaccinated.', 39 NOW() 40 ) 41 RETURNING listing_id; 17 SELECT * FROM owner WHERE user_id = ? 18 19 INSERT INTO listing (owner_id, animal_id, description, price, status, created_at) 20 VALUES (?, ?, ?, ?, 'ACTIVE', NOW()) 42 21 }}} 43 22 [[Image(listing3.png)]]
