I want to search a particular string in the whole database table and get the row details of the matched column. For example I am having the table as like below
**name email address designation**
sai xy@mail 75385 nagar
thiru y@mail 75893 city
Now I am having the searching key like “nagar” or “thiru” how can prepare a query for it. if any one knows Please help me. Thanks in advance.
Read the whole table into a cursor and search in each column to get column name.
May be like this:
fetchAllData() function in DataBaseAdapter class contains following code:
This will give column name of your key.
So now it’s easy to run query like this: