1
我想通过在yii2中使用activerecord查询来访问我的数据库表中的最后一条记录之前的一条。在yii2中的最后一条记录之前选择一条
例如像这样:
$query = Product::find()
->where(['NOT IN', 'price_off', ''])
->orderBy('id DESC')
->limit('1,1') //But this limit not work correctlly
->one();
This page没有帮助我。
非常感谢。有用 –