Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot paginate SQL query with sub-SELECT. #36

Open
MikuAuahDark opened this issue May 23, 2024 · 0 comments
Open

Cannot paginate SQL query with sub-SELECT. #36

MikuAuahDark opened this issue May 23, 2024 · 0 comments

Comments

@MikuAuahDark
Copy link

MikuAuahDark commented May 23, 2024

Consider this query:

SELECT * FROM foo WHERE bar_id IN (SELECT id FROM bar) LIMIT 0,30

The paginator will try to find the count by running SELECT COUNT(*) AS count FROM bar). Note the trailing closing parenthesis and the wrong table. This result in the pagination no longer works due to SQL syntax error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant