Shubham Chauhan
Shubham Chauhan

Reputation: 969

I want to search a specific string form a particular column(contains Strings) in my parse table in android

I want to search a specific string "f2b5e2511827bc26a1b43d73fa76dc5a0a34daa8" from "manual_friendID" column in my parse table named as "Manual_FriendList"

Upvotes: 0

Views: 49

Answers (1)

galvan
galvan

Reputation: 7476

Use ParseQuery to look for data. Initialzie it with the class name, then add custom conditions on the required data, in our case search for column 'manual_fiendID' to be equal to your id and then async find your data.

ParseQuery query = new ParseQuery("Manual_FriendList");
query.whereEqualTo("manual_frienID", the_id_you_want_to_search);
query.findInBackground(new FindCallback<ParseObject>() {

    @Override
    public void done(List<ParseObject> objects,
            ParseException e) {
        if (e == null) {
            //Success - do whatever you want with this user

        } else {
            Log.d("TAG", "Error: " + e.getMessage());
        }

    }
});

Upvotes: 1

Related Questions