我有这样的网格视图
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'movie.movie_name',
'start_date',
'end_date',
'theatre.theatre_name',
'screen.screen_name',
'time.start_time',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
我如何根据start_date
降序排列?
答案 0 :(得分:9)
在搜索模型中添加WHERE varchar = varchar AND datetime BETWEEN Date1 AND Date2
属性:
sort