mardi 13 janvier 2015

Using an INTEGER column in a where clause in sqlite

I am currently working on a timetable project where i need to retrieve specific row on the click of an item on a list. Apparently, the question may have been treated but no working answer has been provided. I have been battling with this for two days and i really need help. The query looks thus:



public Cursor retrieveAllData(int rowIdToFetch){

String[] columns = {ModelConstants.DAY,ModelConstants.COURSE_CODE ,ModelConstants.COURSE_TITLE,ModelConstants.START_TIME, ModelConstants.END_TIME,
ModelConstants.LECTURER, ModelConstants.VENUE};
return database.query(ModelConstants.TABLE_NAME, columns,ModelConstants.ID+" = " + rowIdToFetch, null, null, null, null);

Aucun commentaire:

Enregistrer un commentaire