Advertisement
armadiazrino

Untitled

Feb 11th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public Student getStudent(long id) {
  2. String sql = "SELECT * FROM student WHERE id=?";
  3. Cursor cursor = database.rawQuery(sql, new String[]{Long.toString(id)});
  4. cursor.moveToFirst();
  5.  
  6. Student student = fetchRow(cursor);
  7.  
  8. cursor.close();
  9. return student;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement