so I am trying to understand how prepared statements are handled exactly? I have this code but I am unsure if it is using prepared statement or how to add prepared statements to it.
Code:
/*
* Creating a word
*/
public long createword(DatabaseWords word) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(KEY_DICTIONARYID, word.get_dictionaryId());
values.put(KEY_WORD1, word.get_word1());
values.put(KEY_WORD2, word.get_word2());
values.put(KEY_WORD3, word.get_word3());
values.put(KEY_WORD4, word.get_word4());
// insert row
long word_id = db.insert(TABLE_WORDS, null, values);
return word_id;
}
How do I include prepared statements to A. make it go quicker, B. prevent attacks to the db