I have a db that is created like this...
public class DataBaseManager extends SQLiteOpenHelper{
Context mContext;
private static final String TAG =
Your query is wrong, as WHERE column = string
will not work.
String selectQuery = "SELECT "+colID+ " FROM " + allScreens + " WHERE " + colName + "=?";
Cursor c = db.rawQuery(selectQuery, new String[] {name});
Use ?
which will be replaced by the second rawQuery()
parameter. Strongly recommended.
Not recommended: WHERE column = "string"