diff --git a/author.php b/author.php index a60ad2c..ba871ce 100644 --- a/author.php +++ b/author.php @@ -47,10 +47,10 @@ class Author extends Base { } public static function getAllAuthorsByFirstLetter() { - $result = parent::getDb ()->query('select substr (upper (sort), 1, 1) as title, count(*) as count + list (, $result) = parent::executeQuery ("select {0} from authors group by substr (upper (sort), 1, 1) -order by substr (upper (sort), 1, 1)'); +order by substr (upper (sort), 1, 1)", "substr (upper (sort), 1, 1) as title, count(*) as count", "", array (), -1); $entryArray = array(); while ($post = $result->fetchObject ()) { diff --git a/book.php b/book.php index 1ac4691..60f4189 100644 --- a/book.php +++ b/book.php @@ -539,10 +539,10 @@ where data.book = books.id and data.id = ?'); } public static function getAllBooks() { - $result = parent::getDb ()->query("select substr (upper (sort), 1, 1) as title, count(*) as count + list (, $result) = parent::executeQuery ("select {0} from books group by substr (upper (sort), 1, 1) -order by substr (upper (sort), 1, 1)"); +order by substr (upper (sort), 1, 1)", "substr (upper (sort), 1, 1) as title, count(*) as count", self::getFilterString (), array (), -1); $entryArray = array(); while ($post = $result->fetchObject ()) {