0

I've had a look into OR statements and NOT EQUAL TO in Firebase queries, however I couldn't find anything to get it working.

What would be the most efficient way to execute either query?

Thank you all for your help!

AL.
  • 36,815
  • 10
  • 142
  • 281
Xirlas
  • 117
  • 1
  • 1
  • 11
  • `either query` ... you didn't show us _any_ queries. – Tim Biegeleisen Mar 07 '17 at 05:14
  • Please put your question clearly and also mention what you have tried. – Ronak Joshi Mar 07 '17 at 05:18
  • @Tim I don't have any queries to post because i couldn't find anything that exists for what i'm after. I was referring to either a query with "or" statements or a query with "not equal to" statement when I mentioned "either query". – Xirlas Mar 07 '17 at 05:25
  • please check this i hope that helpfull you:[firebase](http://stackoverflow.com/questions/37752402/firebase-database-not-equal-request-alternative-solution-for-ios) – Hiren Vaghela Mar 07 '17 at 05:27
  • @RonakJoshi For example a query that would be the firebase equivalent for this mysql statement "SELECT * FROM example WHERE key=value OR key_2=value" (the OR part is what i'm after). – Xirlas Mar 07 '17 at 05:28
  • You cannot build a query for nodes that are not matching a specific value. You also can't build a query with an `OR` condition. Firebase's queries are limited to a single `equalTo` or a single range (`startAt` and `endAt`). Performing an OR on keys (or the equivalent of a SQL `SELECT * FROM TABLE WHERE id IN (1,2,3)`) is neither possible nor needed on Firebase, since Firebase pipelines the requests. See my answer here: http://stackoverflow.com/questions/35931526/speed-up-fetching-posts-for-my-social-network-app-by-using-query-instead-of-obse/35932786#35932786 – Frank van Puffelen Mar 07 '17 at 05:31

0 Answers0