title: deleting sms from thread SQLite Exception
body: <p><a href="https://i.stack.imgur.com/tzQL6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tzQL6.png" alt="enter image description here"></a>I am developing an application in which when sms is received it is stored in sqlite database and is shown in Listview. If different sms are received from same number then the sms is saved in the form of thread just like in the normal messaging apps.
  Now the problem is that I am not been able to delete the inside messages inside a number. I can delete the whole thread but not one by one messages inside a thread.
  Don't know why is this happening.
  This is the query for creating a table:</p>
  
  <pre><code>public static final String query_createSMSTablee = "create table " + "smss" + "(" + "id" + " integer primary key autoincrement, "
        + "contactnumber" + " text, " + "contactname" + " text," + "message" + " text," + "date" + " text)";
  </code></pre>
  
  <p>Now to make messages as thread i did this:</p>
  
  <pre><code>String query = "select  message  from " + "smss"+ " where " + "contactnumber" + " = \"" + mdataa + "\"" ;
  </code></pre>
  
  <p>Where "mdataa" contains the number of the sender. "message" contains only the message content
  so in this way this becomes a thread i.e. only showing messages from specific number inside thread.
  Now when i long tap on message and try to delete by this query this show me error:</p>
  
  <pre><code>String deleteScreenedMessage = "delete from " + "smss" + " where " + "id" + " = \"" + id + " AND " + "message" + " = \"" + selectedFromList + " AND " + "contactnumber" + " = \"" + mdataa + "\"" ;
  DBtableforNotSpam smsDb = new DBtableforNotSpam(Conversation.this);
  SQLiteDatabase dbw = smsDb.getWritableDatabase();
  dbw.execSQL(deleteScreenedMessage);
  dbw.close();
  </code></pre>
  
  <p>Here "selectedFromList" represents the content of the message and mdataa contains the number of the sender.
  But this query is giving force stop error and says Sqlite Exception.
  Please Help anyone</p>