title: Select one before the last record in yii2
body: <p>I want to access <strong>one before</strong> the last record in my table of database by using activerecord query in yii2.</p>
  
  <p>For example like this:</p>
  
  <pre><code>$query = Product::find()
           -&gt;where(['NOT IN', 'price_off', ''])
           -&gt;orderBy('id DESC')
           -&gt;limit('1,1') //But this limit not work correctlly
           -&gt;one();
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/15968168/get-one-before-the-last-created-table-in-mysql">This page</a> didn't help me.</p>