title: Problem with SQL Query Android Where Clause
body: <p>I have the following code that creates my table.  I insert data into it that looks like this</p>
  
  <pre><code>_id     date     recordName     total
  --------------------------------------
  7      2011     TestMaxRecord     5
  </code></pre>
  
  <p>Java code:</p>
  
  <pre><code>public static final String KEY_ROWID = "_id";   
  public static final String KEY_DATE = "date";
  public static final String KEY_TOTAL = "total";
  public static final String KEY_RECORD_NAME = "recordName";
  
  private static final String DATABASE_CREATE_RECORDS = "create table " + DATABASE_TABLE_RECORDS + " (" 
  + KEY_ROWID + " integer primary key autoincrement, " 
  + KEY_DATE + " text not null, "
  + KEY_RECORD_NAME + " text not null, "
  + KEY_TOTAL + " text not null);";
  
  public Cursor getRecord(String name) throws SQLException {
    return mDb.query(true, DATABASE_TABLE_RECORDS, new String[] {KEY_ROWID, KEY_DATE, KEY_RECORD_NAME, KEY_TOTAL}, KEY_RECORD_NAME + " = " + name, null, null, null, null, null);
  }
  </code></pre>
  
  <p>It throws an exception every time where name = "TestMaxRecord" (despite there being data in there) with the following error </p>
  
  <blockquote>
    <p>android.database.sqlite.SQLiteException: no such column: TestMaxRecord: , while compiling: SELECT DISTINCT _id, date, recordName, total FROM Records WHERE recordName=TestMaxRecord</p>
  </blockquote>
  
  <p>Which looks like to me that it is looking for a column title <code>TestMaxRecord</code>.  I am an android newbie but copied this portion pretty much exactly from an example (it was using int though).  Is there a difference between using int and Strings on your query?</p>