public void updateLessonBooked(ArrayList<Lesson_Booked> array_lesson) {
    // TODO Auto-generated method stub
    SQLiteDatabase db = this.getWritableDatabase();
    for (int i = 0; i < array_lesson.size(); i++) {
      Lesson_Booked lesson = array_lesson.get(i);
      // String selectQuery1 = "SELECT  * FROM "+TABLE_PARENTS_DETAILS +" where "+PID+"="+
      // ParentList.getParentId();

      try {
        ContentValues values = new ContentValues();
        values.put(LID, lesson.getID());
        values.put(Description, lesson.getDescription());
        values.put(Starttime, lesson.getStart_timing());
        values.put(Endtime, lesson.getEnd_timing());
        values.put(LessonDate, lesson.getDate());

        // cursor = (SQLiteCursor) db.rawQuery(selectQuery1, null);
        // if (cursor.moveToFirst()) {
        // updating row
        //	int a=db.update(TABLE_PARENTS_DETAILS, values, PID + " = ?",
        //			new String[] { String.valueOf(ParentList.getParentId()) });
        // }else{
        db.insert(TABLE_LESSON_BOOKED, null, values);
        // }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
    db.close();
  }