title: data type mismatch error when using ORDER BY
body: <p>I've got an android app using a local sqlite database.</p>
  
  <pre><code>private SQLiteDatabase mDb;
  </code></pre>
  
  <p>when I run this query I get my Cursor over rows with pid equal to id, as desired:</p>
  
  <pre><code>mDb.query(true, PT_TABLE, new String[] {KEY_PID, KEY_TID}, 
      KEY_PID+" = "+id, null, null, null, null, null);        
  </code></pre>
  
  <p>when I run the following query, aiming to get that same result set, ordered by pid I get "<strong>android.database.sqlite.SQLiteException: datatype mismatch</strong>"</p>
  
  <pre><code>mDb.query(true, PT_TABLE, new String[] {KEY_PID, KEY_TID}, 
      KEY_PID+" = "+id, null, null, null, null, KEY_PID+" DESC");
  </code></pre>
  
  <p>Any ideas?</p>