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

How to page using FluentPDO #302

Open
klebinhopk opened this issue Dec 5, 2019 · 1 comment
Open

How to page using FluentPDO #302

klebinhopk opened this issue Dec 5, 2019 · 1 comment
Labels

Comments

@klebinhopk
Copy link

Is it possible to create a paging function in a query with FluentPDO today?

For example:
image

@klebinhopk klebinhopk changed the title Create Pagination in "SELECT" How to page using FluentPDO Dec 5, 2019
@adam-buckley
Copy link

There's no (as far as I know) paginate helper functions in Fluent, the way we achieve pagination is to use the offset and limit functions, which is how you'd do it when writing SQL:

// $page must be 1 or larger
$your_fluent_query->offset(($page - 1) * $page_size)->limit($page_size)->fetchAll();

@cbornhoft cbornhoft added the 3.0 label Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants