I have two tables, one is Info and another is WorkDetails.
Table Info: ID(PK), Name, Weather, Date, Status, TimeIn_Info, TimeOut_Info
Table WorkDetails: ID(PK),Project,WorkDescription,Per,TimeIn,TimeOut // 4 row
How can I insert the d value to the TimeOut and TimeOut_Info which are in two different tables when button is clicked?
public void checkRow3(String a, String b, String c, String d)
{
if(!d.equals("null"))
{
WD.insertWorkDetails(a3, a, b, c, d); // working fine
db.execSQL("INSERT into" + MyDatabaseHelper.TABLE_INFO + "(TimeOut_Info) values(?);", new String[]{d}); //insert d to Table Info column TableOut_Info
Toast.makeText(this, "Done", Toast.LENGTH_SHORT).show();
return;
}
}
Is this the correct way to implement?
Aucun commentaire:
Enregistrer un commentaire