I'm returning some fields from the database, namely: id, title, color, start, end, start_time, end_time and obs
In this case, when registering the fields using while in a php file and returning in a json array, the following example follows:
$query_events = "SELECT id, title, color, start, end, start_time, end_time, obs FROM events";
$resultado_events = $pdo->prepare($query_events);
$resultado_events->execute();
$events = [];
while($row_events = $result_events->fetch(PDO::FETCH_ASSOC)){
$id = $row_events['id'];
$title = $row_events['title'];
$color = $row_events['color'];
$start = $row_events['start'];
$end = $row_events['end'];
$start_time = $row_events['start_time'];
$end_time = $row_events['end_time'];
$obs = $row_events['obs'];
$events[] = [
'id' => $id,
'title' => $title,
'color' => $color,
'start' => $start,
'end' => $end,
'start_time' => $start_time,
'time_end' => $time_end,
'obs' => $obs
];
}
echo json_encode($events);
But it is not returning in the html of the page even listing. Returns only id, start and end
list records in database and display via json array with jquery in fullcalender
start_time
,time_end
,obs
- those are all not default properties. So did you anything to configure Fullcalendar to use these for something?