title: cannot delete data using given Query
body: <p>I have three tables and I want to delete them.</p>
  
  <p>Table Info:<code>id(PK),name,status,date,weather</code></p>
  
  <p>Table WorkForce: <code>id1(PK), subContractors,noOfPeople,noOfHours,TInfo_id(FK to table Info)</code></p>
  
  <p>Table WorkDetails:<code>id2(PK),project,workDescription, Twf_id(FK to table workForce),TableInfo_id(FK to table Info) //contains multiple row</code></p>
  
  <p><strong>Table Info</strong></p>
  
  <pre><code> ID          NAME        Weather        Date     Status
   ----------  ----------  ----------  ----------  ----------
      1           Paul        Sunny         15/10      MC
      2           Allen       Rainy         15/10      Working
  </code></pre>
  
  <p><strong>Table WorkForce</strong></p>
  
  <pre><code>ID1          SubContractors   NoOfPeople      NoOfHours        TInfo_id
  ----------  --------------   ----------       ----------     -----------
  1           AAA                2                 2                 1
  2           BBB                3                 1                 2
  </code></pre>
  
  <p><strong>Table WorkDetails</strong></p>
  
  <pre><code>ID2         Project       WorkDescription        TableInfo_id      Twf_id
  ----------  ----------     --------------          ----------    ----------
  1              A               B                       1             1
  2                                                      1             1
  3                                                      1             1
  4                                                      1             1
  5               C               D                      2             2
  6                                                      2             2
  7                                                      2             2
  8                                                      2             2
  </code></pre>
  
  <p>Assume I want to delete ID 17 in table Info by using code below</p>
  
  <p><strong>ListDisplay.java</strong></p>
  
  <pre><code>  listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
              public boolean onItemLongClick(final AdapterView&lt;?&gt; p, View v, final int po, long id) {
                  final long id1=id;
                  AlertDialog.Builder builder = new AlertDialog.Builder(ListDisplay.this);
                  builder.setTitle("Delete");
                  builder.setMessage("Are you sure you want to delete?");
                  builder.setIcon(android.R.drawable.ic_dialog_alert);
                  builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int ii) {
  
                          database = dbHelper.getWritableDatabase();
                          Cursor cursor = (Cursor) p.getItemAtPosition(po);
  
                          // Get the state's capital from this row in the database.
                          long ID =
                                  cursor.getLong(cursor.getColumnIndexOrThrow("_id"));
                        sqlcon.delete(ID);
  
                      }
                  });
                  builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener()
  
                          {
                              public void onClick(DialogInterface dialog, int ii) {
                                  dialog.dismiss();
                              }
                          }
  
                  );
                  builder.show();
                  return true;
              }
          });
  </code></pre>
  
  <p><strong>InfoAPI.java</strong></p>
  
  <pre><code>  public void delete(long a)
      {
           database.delete(MyDatabaseHelper.TABLE_INFO + MyDatabaseHelper.TABLE_WORKFORCE, MyDatabaseHelper.TABLE_WORKDETAILS + "WHERE" + MyDatabaseHelper.ID + "=" + a+ MyDatabaseHelper.TInfo_id+ "=" + a +MyDatabaseHelper.Twf_id+ "=" + a, null);
      }
  </code></pre>
  
  <p>I get error as below </p>
  
  <pre><code>10-19 01:45:54.816    6002-6002/com.example.project.project E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: com.example.project.project, PID: 6002
      android.database.sqlite.SQLiteException: unrecognized token: "17TInfo_id" (code 1): , while compiling: DELETE FROM InformationWorkForce WHERE WorkDetailsWHERE_id=17TInfo_id=17TWf_id=17
              at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
              at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:887)
  </code></pre>