Wiki

Articles tagged with "count", sorted by date (updated)X
Displaying 1-3 of 3 result(s).

Relation scope to test existence of related records ("EXISTS")

Updated 2 months ago by le_topHow-tos0 comments – viewed 2,328 times – ( +1 ) – version 1.1
When one needs to select a record in a table that do not have related records through a relation, it is generally suggested to use a subquery. Personnaly, I prefer a high level approach, and I have a method to do it with scopes.

Searching and Sorting by Count of Related Items in CGridView

Updated 4 months ago by softarkHow-tos13 comments – viewed 35,506 times – ( +31 ) – version 1.1
Let's say we have two models and relation between them:

Filter & Sort by Summary Data in GridView Yii 2.0

Updated about a year ago by Kartik VTutorials6 comments – viewed 14,545 times – ( +39 / -4 ) – version 2.0
This wiki explains how to add summary data from related models into your Yii Framework 2.0 gridview with filtering and sorting by the summary columns.