Q:

SQL in android dosent work

I want to update a row in a SQL table in a column (`click'). I can see the row in debug but it isn't recognized.
If click==0 so change to click==1.
Does someone know what is my mistake?
My code is:
public void UpdateClicked2(String name, int table) {
  ContentValues values = new ContentValues();
  String selectQuery = "SELECT  * FROM " + MySQLiteGUESTS.TABLE_NAME
    + " WHERE " + MySQLiteGUESTS.COLUMN_TABLE + "=" + table;

  Cursor cursor = database.rawQuery(selectQuery, null);

  cursor.moveToFirst();
  while (!cursor.isAfterLast()) {
    GuestInfo comment = cursorToComment(cursor);
    if (comment.getName().toString() != name)
      cursor.moveToNext();
    else {
      if (comment.getClick() == 1) {
        values.put(MySQLiteGUESTS.COLUMN_CLICK, 0);
      } else
        values.put(MySQLiteGUESTS.COLUMN_CLICK, 1);
      }
    }
    String newString = MySQLiteGUESTS.COLUMN_NAME + " = " + name;
    database.update(MySQLiteHelper.TABLE_NAME, values, newString, null);

  }

A:

if (comment.getName().toString() != name)
Instead of this 
Use this:
if (comment.getName().toString().equals(name))
{
}

