lundi 8 juin 2015

cursorloader selection query using like

I am doing search functionality using CursorLoader class. i want to check search word present in first name or in second name.

 cursorLoader = new CursorLoader(getActivity(),
            FriendinfoTable.CONTENT_URI, null, null, null, null);
    return cursorLoader;

how to write this selection query using like ..

my db is like below

 public class FriendinfoTable {
    public static final String TABLE_NAME = "friendinfotable";


    public static class Cols {


        public static final String ID = "_id";
        public static final String FIRST_NAME = "first_name";
        public static final String LAST_NAME = "last_name";
        public static final String USER_NAME = "user_name";
        public static final String EMAIL="email";
        public static final String USER_PROFILE_PIC="user_profile_pic";
        public static final String USER_TIMELINE_PIC="user_timeline_pic";
        public static final String COUNTRY="country";
        public static final String STATE="state";
        public static final String CITY="city";
        public static final String ABOUT="about";
        public static final String GENDER="gender";
        public static final String DATEOFBIRTH="dob"; 
        public static final String FRIENDSHIP_STATUS="friendship_status"; 
        public static final String QUICKBLOX_ID="quickblox_id"; 

                            }


}

please help me

Aucun commentaire:

Enregistrer un commentaire