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

use SQL_CALC_FOUND_ROWS #47

Closed
shamim2883 opened this issue Feb 12, 2018 · 5 comments
Closed

use SQL_CALC_FOUND_ROWS #47

shamim2883 opened this issue Feb 12, 2018 · 5 comments

Comments

@shamim2883
Copy link

Now we can not use SQL_CALC_FOUND_ROWS
May you please support this?

@shadowhand
Copy link
Owner

What is preventing you from using it? A SELECT with an Expression as the column should work fine.

@shamim2883
Copy link
Author

Thank you for such a quick reply.
With an Expression will create a comma, But there will be no comma with SQL_CALC_FOUND_ROWS

@shadowhand
Copy link
Owner

Ah, right. Would something like this work for you?

$query = $queryFactory->select(/* ... */)->calcFoundRows(true);

@shamim2883
Copy link
Author

yes, i think that will be fine.

@shamim2883
Copy link
Author

shamim2883 commented Feb 12, 2018

or more generic, any word can be added, eg
$query = $queryFactory->select(/* ... */)->addString( string ...$string );
$string can be DISTINCT SQL_CALC_FOUND_ROWS etc any word which does not need any comma

@shadowhand shadowhand mentioned this issue Mar 27, 2018
9 tasks
shadowhand added a commit that referenced this issue Mar 29, 2018
shadowhand added a commit that referenced this issue Mar 29, 2018
shadowhand added a commit that referenced this issue Mar 29, 2018
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

2 participants