Changes between Version 1 and Version 2 of AdminManagesGenres


Ignore:
Timestamp:
08/24/26 16:03:09 (13 days ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdminManagesGenres

    v1 v2  
    88**2.** The system displays all existing genres and their usage counts.
    99{{{#!sql
    10 SELECT g.genre_id, g.name, COUNT(hg.story_id) AS stories_using_genre
     10SELECT g.genre_id, g.genre_name, COUNT(hg.story_id) AS stories_using_genre
    1111FROM GENRE g
    1212LEFT JOIN HAS_GENRE hg ON g.genre_id = hg.genre_id
    1313GROUP BY g.genre_id
    14 ORDER BY g.name ASC;
     14ORDER BY g.genre_name ASC;
    1515}}}
    1616
     
    2020{{{#!sql
    2121SELECT * FROM GENRE
    22 WHERE LOWER(name) = LOWER('Science Fiction');
     22WHERE LOWER(genre_name) = LOWER('Science Fiction');
    2323}}}
    2424
    2525**5.** The genre does not exist, so the system inserts it.
    2626{{{#!sql
    27 INSERT INTO GENRE (name)
     27INSERT INTO GENRE (genre_name)
    2828VALUES ('Science Fiction');
    2929}}}