1
  {
    "unique_key1": {
            "email":"someone@one.com",
            "name": "name1",
            "age": 21,
            "password": "xyz"
            "gcm_id":"abc"
            },
    "unique_key2": {
            email:"sometwo@two.com",
            "name": "name2",
            "age": 2,
            "password": "xyz1"
            "gcm_id":"abc1"
            }
}  

I am trying to create a loginActivity for my android application.I know we can use the firebase auth for login but as i have to store more data along with email and password therefore i have create my own custom login.I have read many blogs on retrieving data and queries but no where found multiple where clause for verifying a user.

var ref = new Firebase('https://your.firebaseio.com/');
ref
  .orderBy('email')
  .startAt('someone@one.com').endAt('someone@one.com')
  .orderBy('password')
  .startAt('xyz').endAt('xyz')

I have used above code which i used from Query based on multiple where clauses in firebase but no success as it throws exception of multiple orderby in log .I have also read this blog https://www.firebase.com/blog/2013-10-01-queries-part-one.html . Please help

Community
  • 1
  • 1
DRY Believer
  • 1,001
  • 11
  • 20
  • 1
    In the answer from http://stackoverflow.com/questions/26700924/query-based-on-multiple-where-clauses-in-firebase @Frank van Puffelen says that multiple orderby clauses will not work and the first line of code is `// !!! THIS WILL NOT WORK !!!`. The error is the expected behavior in this case. He then gives three options that will work. Have you tried those? – Luke Schlangen Feb 22 '16 at 20:46
  • @LukeSchlangen I am open to suggestions how I can make that even clearer. Maybe I should just remove the snippet? It was a fun experiment at the time with a beta API, but if this is what comes from it... – Frank van Puffelen Feb 22 '16 at 23:00
  • That might make sense. I'll admit that I skim answers just like everyone else, so it might be good to take out the snippet. It's a really great and detailed answer. – Luke Schlangen Feb 23 '16 at 04:45
  • @FrankvanPuffelen i have posted answer please do check it – DRY Believer Feb 24 '16 at 09:23

0 Answers0