title: android.database.CursorIndexOutOfBoundsException:Index -1 requested, with a size of 0
body: <p>I'm trying to use a cursor to return the most recently added entry into a database. I get the error in the title when I send the following code:</p>
  
  <pre><code>    SQLiteDatabase db =getReadableDatabase();
      String sql = "SELECT * FROM "+SPORTS_TABLE_NAME+" ORDER BY Sport_id DESC LIMIT 1;";
      Cursor cursor = db.rawQuery(sql, null);
      db.close();
      return cursor.getInt(0);
  </code></pre>
  
  <p>Any ideas?</p>