Пример #1
0
 @Override
 public void updateWord(Word word) {
   Db_Help dbhelper = new Db_Help(mContext);
   String query =
       "UPDATE tb_words SET vocab='"
           + word.getVocab()
           + "'"
           + ",meaning='"
           + word.getMeaning()
           + "',pronunciation='"
           + word.getPronunciation()
           + "' WHERE _id='"
           + word.getId()
           + "'";
   Log.e("DB_QUERY", query);
   dbhelper.executeQuery(query);
 }
Пример #2
0
  @Override
  public void insertWord(Word word) {
    Db_Help dbhelper = new Db_Help(mContext);
    Common_helper common_helper = new Common_helper(mContext);

    String query =
        "INSERT INTO tb_words VALUES ('"
            + common_helper.getGUID()
            + "',"
            + "'"
            + word.getVocab()
            + "',"
            + "'"
            + word.getPronunciation()
            + "',"
            + "'"
            + word.getMeaning()
            + "');";
    Log.e("DB_QUERY", query);
    dbhelper.executeQuery(query);
  }