Complex query using firebase

508 views
Skip to first unread message

Lloyd Fairuz

unread,
Nov 28, 2015, 10:58:18 AM11/28/15
to Firebase Google Group
hi everyone. I'm using firebase on my android app. I need help to find an issue to my trouble. I want to do a request like this: I was using the oderbyChild("date") to oder my data from the nearest date to the farest by doing this.


MyApplication.backend.child(urls).orderByChild("value").addValueEventListener(new ValueEventListener() {
}


now i want to this select all where the activity value is done and order theme by my date value. i have write this :


MyApplication.backend.child(urls).orderByChild("task").equalTo("done").addValueEventListener(new ValueEventListener(){
}


My problem is that it's not possible to do 2 two orderByChild on the same fireBase query. How can i fix this ? please need help.

Kato Richardson

unread,
Nov 28, 2015, 11:05:24 AM11/28/15
to Firebase Google Group
You can't query on multiple fields. This has been covered many times on Stack Overflow and the mailing list.



--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f779eb1b-7f9e-434f-8ff4-f0f83a84a2bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jay

unread,
Nov 29, 2015, 7:50:56 AM11/29/15
to Firebase Google Group
Reply all
Reply to author
Forward
0 new messages