title: E/SQLiteLog: (1) unrecognized token: ":"
body: <p>I'm trying to query a string where the value corresponds to a url address in sqlite/android studio, but it keeps throwing an exception:</p>
  
  <pre><code>E/SQLiteLog: (1) unrecognized token: ":"
  D/AndroidRuntime: Shutting down VM
  E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.project, PID: 4525
      android.database.sqlite.SQLiteException: unrecognized token: ":" (code 1): , while compiling: SELECT  * FROM URLS_ITEMS WHERE title = Google AND url = http://www.google.com;
      #################################################################
      Error Code : 1 (SQLITE_ERROR)
      Caused By : SQL(query) error or missing database.
          (unrecognized token: ":" (code 1): , while compiling: SELECT  * FROM URLS_ITEMS WHERE title = Google AND url = http://www.google.com;)
      #################################################################
          at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
          at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1096)
          at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:661)
  </code></pre>
  
  <p>And here's code snippet where the exception has been thrown:</p>
  
  <pre><code>public boolean isUrlAlreadyStored(String title, String url) {
          ArrayList&lt;URLItem&gt; urlDetailList = new ArrayList&lt;URLItem&gt;();
          String query = "SELECT  * FROM " + DATABASE_TABLE_URLS_ITEMS + " WHERE title = " + title + " AND url = " + url + ";";
          Cursor cursor = database.rawQuery(query, null);
  </code></pre>
  
  <p>I guess I should escape the character/token : but not sure how. I tried: url = url.replaceAll(":", ":") but apparently it's not the right way to do it.</p>
  
  <p>Does anybody know how to query a value/string such as "<a href="https://www.stackoverflow.com">https://www.stackoverflow.com</a>"?</p>