I am executing the SQL database on android but I am not getting correct output.

Cursor c = db.rawQuery(selectQuery, null);

    if (c != null)

    StudentsModel students = new StudentsModel();
    students.id = c.getInt(KEY_ID);
    students.phone_number = c.getString(KEY_PHONENUMBER);
    students.name = c.getString(KEY_NAME);

Model class I am using contains id, name and phone_number. I am unable to fetch result. There is problem in my code.

Related posts

Recent Viewed