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

Scope to test existance of related records

Created 4 days ago by le_topHow-tos0 comments – viewed 423 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 10 months ago by Kartik VTutorials6 comments – viewed 10,376 times – ( +37 / -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 33,707 times – ( +31 ) – version 1.1
Let's say we have two models and relation between them: