Wiki

Articles tagged with "count"X
Displaying 1-3 of 3 result(s).

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

Created 3 months ago by le_topHow-tos0 comments – viewed 2,335 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.

Filter & Sort by Summary Data in GridView Yii 2.0

Created about a year ago by Kartik VTutorials6 comments – viewed 14,604 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.

Searching and Sorting by Count of Related Items in CGridView

Created 3 years ago by softarkHow-tos13 comments – viewed 35,534 times – ( +31 ) – version 1.1
Let's say we have two models and relation between them: