ajkosh
(Ajaykaushiksharma087)
1
what i m doing wrong
$query = new yii\db\Query;
$query = Positions::find()
->select('name')
->asArray()
->where('time between "'.start_time.'" and "'.end_time.'"')
->orderBy('time')
->all();
$provider = new ActiveDataProvider([
'query' => $query,
'pagination' => [
'pageSize' => 20,
],
]);
i m getting following error
The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.
CodeGeek
(Mk K Greek)
2
Try this - http://www.yiiframew…taprovider.html
kiankhoon
(Kiankhoon)
3
just remove the "->all()" will do:
$query = new yii\db\Query;
$query = Positions::find()
->select(‘name’)
->asArray()
->where(‘time between "’.start_time.’" and “’.end_time.’”’)
->orderBy(‘time’);
ajkosh
(Ajaykaushiksharma087)
4
if i need all() then wat i need to do
1 Like