Answer the question
In order to leave comments, you need to log in
Why does the query select everything from the database and not 20 records?
SELECT `chapter`.`id`, `chapter`.`slug` as chapter_slug, `manga`.`slug` as manga_slug, `manga_id`
FROM `chapter` JOIN `manga` ON `chapter`.`manga_id` = `manga`.`id`
WHERE `chapter`.`id` IN
(SELECT * FROM (SELECT `chapter_id`
FROM `page`
WHERE `compress` = 0
GROUP BY `chapter_id`
ORDER BY CAST(`page`.`filesize` AS INTEGER) DESC LIMIT 20) t1)
SELECT * FROM (SELECT `chapter_id`
FROM `page`
WHERE `compress` = 0
GROUP BY `chapter_id`
ORDER BY CAST(`page`.`filesize` AS INTEGER) DESC LIMIT 20) t1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question