We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Following closed issue #16, documentation on the subject is needed. I set up a small sample project on https://github.com/thejoelinux/cakephp-dt-test to have a test case.
I want to have a list of customers in datatables, with the number of invoices for each, or the sum of invoices if possible.
I try to find a way to do so, but in the meanwhile, any help would be very much appreciated.
The text was updated successfully, but these errors were encountered:
@thejoelinux you will need to do something along the lines
in Template.../datatables/configName.ctp
$results->select([ 'invoice_count' => $results->newExpr()->add('sql expression that counts'); 'invoice_count' => $results->func()->count('Invoices.id') ]); $results->group('Customers.id');
Can use either method, I think.
Sorry, something went wrong.
Thanks for the tip. I used this in my sample project, issue 2, and I will soon commit a solution. It was pretty easy ... once done :)
Next, I'll propose a documentation patch here.
No branches or pull requests
Following closed issue #16, documentation on the subject is needed. I set up a small sample project on https://github.com/thejoelinux/cakephp-dt-test to have a test case.
I want to have a list of customers in datatables, with the number of invoices for each, or the sum of invoices if possible.
I try to find a way to do so, but in the meanwhile, any help would be very much appreciated.
The text was updated successfully, but these errors were encountered: