Increment and insert Integer values on Android SQLite Database?

Answer by @MPelletier You should also rethink your column name "Count", as it is a reserved word for a function.

Im trying to insert values on Android SQLite Database. The question is, Iḿ trying to insert a word, the table has 3 columns, ID, WORD, COUNT. When I insert a word in the database, some method will verify if this word exists on the database.

If yes, it will increment the value of COUNT for this word. I have a word "Question" in the database with COUNT value 1, and I want to insert it again, the method will find this word and if I want to insert "qUeSTion" it doesn't matter, it will return "Question" for me when I retrieve the data, and it will increment the value of COUNT from 1 to 2. SO here is my code.

I'm having problems when try to do this, this verification. I don't know what method to use, etc. I'm using SQLiteStatement for insert. But the methods which offers doesn work.

Any Idea of what use?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions