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(); |