I’, trying to update my database using this.
String dd = "1-PC CHICKEN & RICE";
SQLiteDatabase db2 = openOrCreateDatabase("order",MODE_PRIVATE,null);
ContentValues values = new ContentValues();
values.put("Description",(((TextView) findViewById(R.id.etoriginal)).getText().toString()));
db1.update("list", values, "Description ="+ dd ,null);
But i got this error in my log cat
07-04 16:20:00.659: E/AndroidRuntime(21504): android.database.sqlite.SQLiteException: near "CHICKEN": syntax error: , while compiling: UPDATE list SET Image=? WHERE Description =1-PC CHICKEN & RICE
I can’t figure out what is causing this
You need to wrap the condition in quotes: