mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
fix(recents): Can't open chapters from Grouped and All
id column name for mangas and chapter is both _id causing it conflict when doing 'Rn.*'. In fact, 'Rn.*' is not even needed for union, it just needs to be on the same order, same type, and have the same number of columns.
This commit is contained in:
parent
22978ab8bf
commit
d3c98fb897
3 changed files with 9 additions and 9 deletions
|
@ -110,7 +110,6 @@ ORDER BY max_last_read.history_last_read DESC
|
|||
LIMIT :limit OFFSET :offset;
|
||||
|
||||
getRecentsAll:
|
||||
SELECT R1.* FROM (
|
||||
SELECT
|
||||
M.*,
|
||||
C.*,
|
||||
|
@ -157,11 +156,9 @@ WHERE lower(title) LIKE '%' || :search || '%'
|
|||
AND (
|
||||
:apply_filter = 0 OR S.name IS NULL
|
||||
)
|
||||
) AS R1
|
||||
|
||||
UNION -- Newly added chapter
|
||||
|
||||
SELECT R2.* FROM (
|
||||
SELECT
|
||||
M.*,
|
||||
C.*,
|
||||
|
@ -194,11 +191,9 @@ AND lower(title) LIKE '%' || :search || '%'
|
|||
AND (
|
||||
:apply_filter = 0 OR S.name IS NULL
|
||||
)
|
||||
) AS R2
|
||||
|
||||
UNION -- Newly added manga
|
||||
|
||||
SELECT R3.* FROM (
|
||||
SELECT
|
||||
M.*,
|
||||
C.*,
|
||||
|
@ -225,6 +220,6 @@ JOIN (
|
|||
) AS C
|
||||
WHERE favorite = 1
|
||||
AND lower(title) LIKE '%' || :search || '%'
|
||||
) AS R3
|
||||
|
||||
ORDER BY history_last_read DESC
|
||||
LIMIT :limit OFFSET :offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue