レコードが見つかりませんでした。


}else{
//creating view table
echo ‘

‘;
echo ‘

‘;

foreach($records as $record){
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
}
echo ‘

電話番号 氏名カナ 持込時間帯
. $record[‘fields’][‘電話番号’] . . $record[‘fields’][‘氏名カナ’] . . $record[‘fields’][‘持込時間帯’] .

‘;
}
function getRecords($apiToken, $subdomain, $appId, $viewId) {
// Set request headers
$headers = array(
‘X-Cybozu-Authorization: Bearer ‘ . $apiToken,
);
//Set request URL
$url = ‘https://’ . $subdomain . ‘.cybozu.com/k/api/v1/app/’ .
$appId . ‘/records?view=’ . $viewId;
// Initialize cURL session
$curl = curl_init();
// set options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// execute request
$response = curl_exec($curl);
// If an error occurs, output the error details
if (curl_errno($curl)) {
echo ‘Error: ‘ . curl_error($curl);
exit;
}
// JSON decode and return
return json_decode($response, true);
}
?>