From 4acfa80e7bdd283c3ff27b1c007105458bcdcbd0 Mon Sep 17 00:00:00 2001 From: SenorSmartyPants Date: Mon, 23 Nov 2020 16:13:14 -0600 Subject: [PATCH] Sort by books_authors_link.id --- lib/Author.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Author.php b/lib/Author.php index 85e2860ec..f378ebc85 100644 --- a/lib/Author.php +++ b/lib/Author.php @@ -83,7 +83,7 @@ public static function getAuthorById ($authorId) { public static function getAuthorByBookId ($bookId) { $result = parent::getDb ()->prepare('select authors.id as id, authors.name as name, authors.sort as sort from authors, books_authors_link where author = authors.id -and book = ?'); +and book = ? order by books_authors_link.id'); $result->execute (array ($bookId)); $authorArray = array (); while ($post = $result->fetchObject ()) {