Changes between Version 3 and Version 4 of UseCase05PrototypeImplementation


Ignore:
Timestamp:
02/07/26 21:03:39 (17 hours ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase05PrototypeImplementation

    v3 v4  
    77[[Image(mypets.png)]]
    88{{{
    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;
     9SELECT * FROM pet WHERE owner_id = ?
    2110}}}
    22112. Clicks on the "Create Listing" button.
     
    26154. System creates the lisitng.
    2716{{{
    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;
     17SELECT * FROM owner WHERE user_id = ?
     18
     19INSERT INTO listing (owner_id, animal_id, description, price, status, created_at)
     20VALUES (?, ?, ?, ?, 'ACTIVE', NOW())
    4221}}}
    4322[[Image(listing3.png)]]