i have an update query where i need to pass multiple parameter. Please guide how to do. Here in place of "id" i want multiple parameters for example name age.
//Code
ContentValues updateCountry = new ContentValues(); updateCountry.put("country_name", "United States"); db.update("tbl_countries", updateCountry, "id=?", new String[] {Long.toString(countryId)})1 Answer1
Try
ContentValues updateCountry = new ContentValues(); updateCountry.put("country_name", "United States"); db.update("tbl_countries", updateCountry, "id=? AND name=? AND age=?", new String[]{Long.toString(countryId),"name_value","age_value"}); Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.