I need to make query (in search model) where:
- Get current row index (not id)
- Do a manipulation with that count (multiply this on constant number) and add if condition (if 'row index' > 10)
- See this count in the model
Some steps I resolve:
I know how to create 'new column' and see it in the gridview:
$query->select([ '{{tour}}.*', '(1000 / 'need to add row index' ) as points' //$points ]);I know how to get a current index, but with active record:
MyModel::find()->andFilterWhere(['>=', 'cumulative_points', $playerPoints])->count();
But I need to combine this query. Anybody can help me? Thanks.