publisher category did not get included in regular search.

added publisher "exists (select ..." as 4th or branch to SQL_BOOKS_QUERY

added argument placeholder as 4th to the various calls to getBooksByQuery.

re #123
This commit is contained in:
At-Libitum 2013-12-08 15:43:23 +01:00
parent 79e070833d
commit 79c2c431cc
2 changed files with 4 additions and 3 deletions

View file

@ -40,6 +40,7 @@ define ('SQL_BOOKS_QUERY', "select {0} from books " . SQL_BOOKS_LEFT_JOIN . "
exists (select null from authors, books_authors_link where book = books.id and author = authors.id and authors.name like ?) or
exists (select null from tags, books_tags_link where book = books.id and tag = tags.id and tags.name like ?) or
exists (select null from series, books_series_link on book = books.id and books_series_link.series = series.id and series.name like ?) or
exists (select null from publishers, books_publishers_link where book = books.id and books_publishers_link.publisher = publishers.id and publishers.name like ?) or
title like ?) {1} order by books.sort");
define ('SQL_BOOKS_RECENT', "select {0} from books " . SQL_BOOKS_LEFT_JOIN . "
where 1=1 {1} order by timestamp desc limit ");