Changes between Version 6 and Version 7 of ImportantCase1


Ignore:
Timestamp:
02/24/25 15:59:47 (6 weeks ago)
Author:
222039
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImportantCase1

    v6 v7  
    1111[[Image(BT-5.png.png)]]
    1212{{{#!sql
    13 SELECT book.bookid, book.CoverImage, book.Title, book.Genre, book.PublishedYear, author.FirstName, author.LastName
    14                                 FROM Book
    15                                 INNER JOIN Book_Author ON Book.BookID = Book_Author.BookID
    16                                 INNER JOIN Author ON Book_Author.AuthorID = Author.AuthorID WHERE book.PublishedYear BETWEEN :year_from AND :year_to
    17 
    18 
     13$stmt = $conn->prepare("SELECT book.bookid, book.CoverImage, book.Title, book.Genre, book.PublishedYear, author.FirstName, author.LastName
     14                        FROM Book
     15                        INNER JOIN Book_Author ON Book.BookID = Book_Author.BookID
     16                        INNER JOIN Author ON Book_Author.AuthorID = Author.AuthorID
     17                        WHERE book.PublishedYear BETWEEN :year_from AND :year_to;
     18");
     19$stmt->bindParam(":year_from", $query_from, PDO::PARAM_STR);
     20$stmt->bindParam(":year_to", $query_to, PDO::PARAM_STR);
     21$stmt->execute();
    1922}}}