title: Getting the last record with Where clause in Codeigniter
body: <pre><code>I have a table like this
  
  id    username        sb
  1     user1_0001      1
  2     user1_0002      1
  3     user1_0003      1
  4     user2_0001      2 
  5     user2_0002      2
  6     user2_0003      2
  7     user3_0001      3
  8     user3_0002      3
  9     user3_0003      3
  10    user3_0004      3
  </code></pre>
  
  <p>how can i query for example i want to get the last record of sb = 1 the output should be user1_0003?</p>