我在表中插入了两个字段,即 truck_id 和 employee_id。
很抱歉问这个问题。但由于我是android新手,请帮帮我。
public void insert(String[] employeeName,int[] truck_id){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues vals = new ContentValues();
vals.put(COLUMN_TRUCKID, "CM-3456");
vals.put(COLUMN_NAME,"Sachin");
//vals.put(KEY_PIN, "12345");
vals.put(COLUMN_TRUCKID, "HR-6788");
vals.put(COLUMN_NAME,"Sameer");
//vals.put(KEY_PIN, "54321");
vals.put(COLUMN_ID, "AM-6123");
vals.put(COLUMN_NAME,"Sahu");
//vals.put(KEY_PIN, "3452");
db.insert("Login", "John",
vals);
db.insert("Login", "Sameer",
vals);
db.execSQL(COLUMN_NAME);
//myDataBase.close();
}