因为很早用过yii,那边数据查询时对于排序是支持SORT_ASC和SORT_DESC的,如下: $query->order(['id' => SORT_ASC])->select()->toArray(); 结果发现这招在tp中不管用了,原来是tp不支持这个。只得用原始的: $query->order(['id' => 'asc'])->select()->toArray();