我想获取数据并更新某些行的数据。 这个代码retrive所有数据来自表解析PHP Rest API更新查询不起作用
function updateStatus(){
$url = 'https://api.parse.com/1/classes/xxxxxxx';
$appId = 'xxxxxxxxx';
$restKey = 'xxxxxxxxx';
$headers = array(
"X-Parse-Application-Id: " . $appId,
"X-Parse-REST-API-Key: " . $restKey
);
$queryParse = '{"date":"21-04-2016"}';
$rest = curl_init($url.$queryParse);
curl_setopt($rest,CURLOPT_URL,$url);
curl_setopt($rest,CURLOPT_HTTPHEADER,$headers);
curl_setopt($rest,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($rest,CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($rest);
curl_close($rest);
return $response;
}
和查询解析也很喜欢
$queryParse = urlencode('where={"date":"21-04-2016","time":07:00 to 10:00}');
但都没有工作。
你必须比“不工作”更具体。怎么了?你认为应该发生什么? (你可以[编辑]你的问题。) –
更新了问题。此代码检索所有数据。 – Rajpoot