dimanche 31 janvier 2016

Comparing words in an sqlite database to a user made string

I have an sqlite database with a variety of words and different values assigned to those words based on the type of activity the word is. Im trying to find a way to query that database for words that match the words in a user inputed string. Once a matching word is found i will then have that words values be assigned to another object i have made.

The problem i i cant figure out how to do the query. I have found plenty of awesome info on searching for a single word in a database, and doing the query by comparing each word in the database to the string one by one, but I've had no luck with any thing i have tried.

My most recent attempt was trying to split the user string into an array of substrings and compare like that but to no avail. Im also trying to keep from dumping the words into an array list as im expecting to expand the database a ton, and imagine that it will cause some memory issues.

Sorry if this turns out to be a repeat question but i am really at a loss for a solution. Thanks a ton for any help!!!

Aucun commentaire:

Enregistrer un commentaire