I am using parse php sdk to handle data in my web page. I have a User class in my database. I am trying to display all user details into my web page. The server connection is correct and working, since it displays all other class details. But it is not working for the User class. Following is my php code.
<?php
$query = new ParseQuery("User");
$results = $query->find();
echo "Successfully retrieved " . count($results) . " scores.";
for ($i = 0; $i < count($results); $i++)
{
$object = $results[$i];
echo $object->getObjectId() . ' - ' . $object->get('name');
}
?>
When I run this code I get the following result
Successfully retrieved 0 scores.
But I have 6 users in my User class.
Use $query = new ParseQuery("_User");
instead of $query = new ParseQuery("User");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With