Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i add order by and equalTo #58

Closed
ithoangphuc opened this issue Nov 25, 2016 · 1 comment
Closed

How can i add order by and equalTo #58

ithoangphuc opened this issue Nov 25, 2016 · 1 comment

Comments

@ithoangphuc
Copy link

I use firebase-php of ktamas77. I try to get data with orderBy => 'data_id' (child) and equal to 'Test' but it report

"error" : "orderBy must be a valid JSON encoded path"

$test = $initFirebase->get('/notification',array('orderBy' => 'data_id', 'equalTo' => 220));

@VMitin
Copy link

VMitin commented Dec 4, 2016

Hey. You must paste the data_id in the double quotes.
My examlpe:
$fireBase->get(PUSH_PATH, array('orderBy' => '"status"', 'equalTo' => PENDING)

And don't forget put the
".indexOn" : "status"
on the firebase rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants