I am working on Android app using Java, I need to query database in Java code to check if userinput(variable) statement is contain words which are in my SQLite DataBase using LIKE
in query and rowQuery
method in java code,
I used this code but it did not work:
cursor = db.rawQuery("SELECT shompet FROM sentence WHERE " + column + " LIKE '%" + newMessage + "%'", null);
newMessage
is my variable(userInput)
I read similar topics but either they are not my answer or they are so complicated.