34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
get summary of related model via STAT relation
Comparing
#1
with
#3
Content
[...]
```
more in your model:
```php
'
itemsMax'=>array(self::STAT, 'Invoiceitem', 'invoice_id', 'select' => 'Max(amount)'),
'
itemsAVG'=>array(self::STAT, 'Invoiceitem', 'invoice_id', 'select' => 'AVG(amount)'), ```