In my application I want to get the id of a particular row. I am using the following code:
public String getid(String heading) throws SQLException {
Try this:
Cursor mCursor = db.rawQuery( "SELECT id FROM savedstoriestable WHERE heading= '"+heading+"'" , null);
heading is a String. So you have to put it inside ''.