title: Android how to write the query with a proper projection?
body: <p>I have a sqlite table called <b>TermTable</b> with <i>id</i>, <i>selected</i>, <i>term</i> and <i>type</i> columns:</p>
  
  <pre><code>static final String TermTable = "Terms";
  static final String ID = "id";
  static final String Selected = "selected";
  static final String Term = "term";
  static final String Type = "type";
  </code></pre>
  
  <p>I create the table as follows:</p>
  
  <pre><code>private static final String TERM_TABLE_CREATE = "Create table " + TermTable +
      "(" + ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
      Selected + " VARCHAR(5) ," +
      Term + " VARCHAR(20) ," +
      Type + " VARCHAR(10))";
  </code></pre>
  
  <p>The column "selected" gets the strings "true" or "false".<br /><br />Now I want to query and get the cursor which gets a string as a <i>term</i> and if its <i>selected</i> column is true, returns the columns <i>id</i> and <i>type</i>:</p>
  
  <pre><code>public Cursor getFavoriteValues(String term)
  {
      String from[] = { "id", "type" };
      String where = ???
      String whereArgs[] = ???
      Cursor cursor = db.query(WordsDB.TermTable, from, where, whereArgs, null, null, null, null);
      return cursor;
  }
  </code></pre>
  
  <p>How are this query attributes defined?</p>