title: SQLite query execution crashes Android App
body: <p>I am populating a listview from SQLite database, and the app crashes when I click on an item. I have done enough research using "query" and "rawquery". Also successfully executed rawquery statement in SQLite Database Browser, but still the same statement doesn't work in my code.</p>
  
  <p>Below is the code of my listview onitemclicklistener:</p>
  
  <pre><code>//  Bookmark ListView Listener
      bookmarkListView.setOnItemClickListener(new OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent1, View view1, int position1,
                  long id1) {
              String selectedBookmarkItem = ((TextView)view1).getText().toString();
  
              dbAdapter.read();
  
              Map&lt;String, Object&gt; bookmarkKV = dbAdapter.getSingleBookmark(selectedBookmarkItem);
              String bookmarkedURL = (String) bookmarkKV.get(dbAdapter.BOOKMARK_ADDRESS);
  
              dbAdapter.close();
              Toast.makeText(getBaseContext(), bookmarkedURL, Toast.LENGTH_LONG).show();
  }
  });
  </code></pre>
  
  <p>Method getSingleBookmark code:</p>
  
  <pre><code>//  Fetch Single Bookmark
  public Map&lt;String, Object&gt; getSingleBookmark(String bookmarkName1) throws SQLException{
      Map&lt;String, Object&gt; map1 = new HashMap&lt;String, Object&gt;();
      Cursor cursor1 = db.query(true, BOOKMARKS_TABLE, new String[] {BOOKMARK_ADDRESS},
              BOOKMARK_NAME + "=" + bookmarkName1, null, null, null, null, null);
  
      if(cursor1 != null){
          cursor1.moveToFirst();
      }
  
      String bookmarkAddress = cursor1.getString(cursor1.getColumnIndex(BOOKMARK_ADDRESS));
      map1.put(BOOKMARK_ADDRESS, bookmarkAddress);
      //String bookmarkName = cursor1.getString(cursor1.getColumnIndex(BOOKMARK_NAME));
      //map1.put(BOOKMARK_NAME, bookmarkName);
  
      return map1;
  }
  </code></pre>
  
  <p>LogCat entry:</p>
  
  <pre><code>09-30 03:43:12.791: E/AndroidRuntime(29008): FATAL EXCEPTION: main
  09-30 03:43:12.791: E/AndroidRuntime(29008): android.database.sqlite.SQLiteException:     
  no such column: gmail (code 1): , while compiling: SELECT DISTINCT bookmarkaddress 
  FROM bookmarkstable WHERE bookmarkname=gmail
  </code></pre>
  
  <p>When I click on "gmail" item in listview, the app crashes saying "Unfortunately, App has stopped".</p>
  
  <p>But the database table has the row with "gmail" entry: </p>
  
  <p><img src="https://i.stack.imgur.com/K2fSl.png" alt="enter image description here"></p>