title: Android Sqlite selection args[] incorrect value?
body: <p>I have different variants of a query. All value types are Strings! (don't ask why...)
  The first one might look like this:</p>
  
  <pre><code>SELECT * FROM item WHERE arg1=false
  </code></pre>
  
  <p>The string ("sqlWhere") for the arg(s) looks like this:
  "arg1=?"</p>
  
  <p>The string for the arg(s)-Array (args) at index 0 looks like this:
  "false"</p>
  
  <p>This works fine. I've got 715 results.</p>
  
  <p>Now, if i have something like this:</p>
  
  <pre><code>SELECT * FROM item WHERE (arg1=40 OR arg2=42) AND arg3=false
  </code></pre>
  
  <p>I'll expect 110 results for this. But there aren't any results, no Exception is thrown</p>
  
  <p>If I'll generate a raw query in Firefox SQLite Manager:</p>
  
  <pre><code>SELECT COUNT(*) FROM item WHERE (arg1=40 OR arg2=42) AND arg3=false
  </code></pre>
  
  <p>I'll get the error: "no such column: false"
  If I generate a query like this:</p>
  
  <pre><code>SELECT COUNT(*) FROM item WHERE (arg1=40 OR arg2=42) AND arg3="false"
  </code></pre>
  
  <p>It'll not fail. BUT. I'm using selectionargs. I've read, that they should AVOID this situation. But they don't. Even, If I put into the selectionargs for arg3 = "\"+"false"+"\"" or arg3 = "\'+"false"+"\'" or even arg3="'"+"false"+"'" it won't work. Maybe an android specific problem? 
  The value "false" comes from a list of values. It is initialized with an emty string. </p>
  
  <p>Query-Method looks like this:</p>
  
  <pre><code>public List&lt;Map&lt;String,String&gt;&gt; getSearchResults(String sqlWhere, String[]args)
      {
          List&lt;Map&lt;String,String&gt;&gt; specs = new ArrayList&lt;Map&lt;String,String&gt;&gt;();
          String[] specnames = this.getSpecNames();
  
          Cursor cursor = mDb.query(dbSchema.SpecSchema.TABLE_NAME, specnames, sqlWhere, args, null, null, dbSchema.SpecSchema._ID + dbSchema.SORT_ASC);
          cursor.moveToFirst();
          while(!cursor.isAfterLast())
          {
              Map&lt;String, String&gt; temp = new HashMap&lt;String, String&gt;();
              for(int i = 0; i &lt; specnames.length; i++)
                  temp.put(specnames[i], cursor.getString(cursor.getColumnIndex(specnames[i])));
              specs.add(temp);
  
              cursor.moveToNext();
          }
  
          if(cursor != null)
              cursor.close();
  
          return specs;
      }
  </code></pre>