Reputation: 2861
please i am trying to search the all column that (dcountry ="France") as example, as illustrated in picture:
i try that code, but not work:
MyFirebase.db.child("Developer").orderByChild("dcountry")
.startAt("France")
.endAt("France"+ "\ufbff")
.addValueEventListener(object:ValueEventListener{
override fun onDataChange(p0: DataSnapshot?) {
Upvotes: 2
Views: 1203
Reputation: 41
I have written query using kotlin. But it will help you
val query = FirebaseDatabase.getInstance()
.getReference()
.child("Developers")
.orderByChild("dcountry")
.equalTo("france")
.limitToFirst(50)
Upvotes: 0
Reputation: 80914
You can do this:
MyFirebase.db.child("Developers").orderByChild("dcountry").equalTo("France").addValueEventListener(object:ValueEventListener{
which will give you all countries that are equal to france
Upvotes: 4