I am trying to get/read data by matching an Integer ID and a specific String, But while compiling the code I am getting this error :
> android.database.sqlite.SQLiteException: near "Computing": syntax
> error (code 1): , while compiling: SELECT * FROM midSemAnsBank WHERE
> id = 4 AND subject = Cloud Computing
Here's what I'm trying :
openReadable();
String select_query= "SELECT * FROM " +MID_SEM_ANSWERS_TABLE + " WHERE " + KEY_ID + " = " + answerID +" AND " + KEY_SUBJECT + " = " + subject +" " ;
Log.d(LOG, select_query);
Cursor c= m_sqLiteDatabase.rawQuery(select_query,null);
if(c!=null)
c.moveToFirst();
what's the proper query to read data by matching two keywords?