Android SQLite, update specific field from specific row
<p>I am trying to update a specific column in my record within SQLite - the object has various attributes, but I just want to update a single field within that row. Here are my codes: </p>

<pre><code>public boolean updateFavorite(String email, int isFavorite){
    SQLiteDatabase db = this.getWritableDatabase();

    ContentValues args = new ContentValues();
    args.put(EMAIL, email);
    args.put(IS_FAV, isFavorite);

    int i = db.update(TABLE_FAVORITES, args, EMAIL + "=" + email, null);

    return i &gt; 0;
}
</code></pre>

<p>I am using the email for my where clause, i.e update record from favorites, set isFavorite to (given value) where email is (passed in value).</p>

<p>There is a problem with my query, which was caught by logcat, as shown below</p>

<pre><code>android.database.sqlite.SQLiteException: near "@sjisis": syntax error (code 1): , while compiling: UPDATE Favorites SET email=?,isFavorite=? WHERE email=sjkshs@sjisis.com
</code></pre>

<p>Can anyone help me identify what is wrong with my codes to produce this error?</p>

<p>P.S my <code>FavoriteObject</code> class has other attributes other than just <code>email</code> and <code>isFavorite</code>, but in this case I am not trying to update them at all</p>