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

Update documentation for SelectQuery::select() #17670

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

joggee-fr
Copy link
Contributor

When using a Closure as first parameter of SelectQuery::select(), it will receive the SelectQuery instance as parameter. However, SelectQuery::count() is not an existing method and FunctionsBuilder returned by SelectQuery::func() must be used instead.


After playing with SelectQuery() and trying to add a COUNT(*) field in my SQL query, I assumed there was a typo in the documentation. Let me know if I am right.

When using a Closure as first parameter of SelectQuery::select(), it
will receive the SelectQuery instance as parameter.
However, SelectQuery::count() is not an existing method and
FunctionsBuilder returned by SelectQuery::func() must be used instead.
@othercorey othercorey added this to the 5.0.8 milestone Apr 19, 2024
@othercorey othercorey merged commit d9f11e6 into cakephp:5.x Apr 19, 2024
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants