php - how to search filter multipe relation table and groupping in yii2 -


i have 3 tables riderspoint (id, namerider, serie_id, point) , series (serie_id, nameserie, location, date, season_id) , season (season_id, nameseason, year). attribute serie_id in riderpoint table have relation serie_id in series table, , attribute season_id in series table have relation season_id in season table. how make search season_id in riderpoint? , how groupping point when have data table in same season? please me..

search (filter , sort) related field in gridview base series of action.. can find sample in doc

http://www.yiiframework.com/wiki/653/displaying-sorting-and-filtering-model-relations-on-a-gridview/

in brief..

  • in model define active relation in (main/pivot) model , add getter related field
  • in modelsearch in dataprovider add var fo related field, set proper sort sorting new related field, add relation in search function , adding proper filter in modelsearch condition
  • add new attribute gridview..

take deep scenario 2 in link provided.. , can find need


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -