I want to get data objects from server with sorting, can admin tell me how to do it in PHP ? because i can’t find it in SDK for PHP Documentation?
regards,
Wendy
I want to get data objects from server with sorting, can admin tell me how to do it in PHP ? because i can’t find it in SDK for PHP Documentation?
regards,
Wendy
already find the answer how to sort DECS the data object :
$query = new BackendlessDataQuery();
$condition = “userId.objectId =’”.$request->json()->get(‘OBJECTID’)."’";
$query->setWhereClause($condition);
$query->addSortBy(“score%20desc”);
$score = Backendless::$Persistence->of(‘Score’)->find($query)->getAsObject();
I must add %20 to this “$query->addSortBy(“score%20desc”);” cause the SDK didn’t encode the parameter to right URL encoding format
please fix it soon thanks
Regard’s
Wendy
Thanks, Wendy. This is fixed now, the code is in github.