@@ -47,6 +47,10 @@ |
||
| 47 | 47 | return Base::getEntryArrayWithBookNumber (self::SQL_ALL_TAGS, self::TAG_COLUMNS, array (), "Tag"); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @param string $query |
|
| 52 | + * @param integer $numberPerPage |
|
| 53 | + */ |
|
| 50 | 54 | public static function getAllTagsByQuery($query, $n, $database = NULL, $numberPerPage = NULL) { |
| 51 | 55 | $columns = "tags.id as id, tags.name as name, (select count(*) from books_tags_link where tags.id = tag) as count"; |
| 52 | 56 | $sql = 'select {0} from tags where upper (tags.name) like ? {1} order by tags.name'; |
@@ -60,6 +60,9 @@ |
||
| 60 | 60 | return Base::getEntryArrayWithBookNumber (self::SQL_ALL_PUBLISHERS, self::PUBLISHERS_COLUMNS, array (), "Publisher"); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | + /** |
|
| 64 | + * @param string $query |
|
| 65 | + */ |
|
| 63 | 66 | public static function getAllPublishersByQuery($query) { |
| 64 | 67 | return Base::getEntryArrayWithBookNumber (self::SQL_PUBLISHERS_FOR_SEARCH, self::PUBLISHERS_COLUMNS, array ('%' . $query . '%'), "Publisher"); |
| 65 | 68 | } |
@@ -58,6 +58,9 @@ |
||
| 58 | 58 | return Base::getEntryArrayWithBookNumber (self::SQL_ALL_SERIES, self::SERIES_COLUMNS, array (), "Serie"); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $query |
|
| 63 | + */ |
|
| 61 | 64 | public static function getAllSeriesByQuery($query) { |
| 62 | 65 | return Base::getEntryArrayWithBookNumber (self::SQL_SERIES_FOR_SEARCH, self::SERIES_COLUMNS, array ('%' . $query . '%'), "Serie"); |
| 63 | 66 | } |