title: Android SQLite Wildcards
body: <p>I'm trying to query with a wildcard element to search my SQLite table for entries with an element at any position in a specific variable.</p>
  
  <pre><code>public String[] getCheckoutEntry(String title, String ISBN)
  {
  //Wild card Syntax
  String titleWildCard = "%" + title + "%";
  String ISBNWildCard = "%" + ISBN + "%";
  //Query
  String query = "select USER,AUTHOR,DATE,CALL_NUMBER,COUNT from CHECKOUT where TITLE = ? or ISBN = ? ";
  String[] selectionArgs = new String[] {titleWildCard, ISBNWildCard};
  Cursor cursor = db.rawQuery(query, selectionArgs);
  </code></pre>
  
  <p>I've checked half a dozen answers on Stack Overflow already and everyone suggests simply appending a "%" to my variable, as seen above. When I try the above code, my program simply interprets titleWildCard including the % as the search query and tries to find % in the table. </p>
  
  <p>If I take out the "%" then the program runs without issue except that it only searches for the exact term.</p>