I am trying to display certain values through GROUP_CONCAT, and GROUP BY, yet only the groups are showing when I test it out, and the other values don't.
function events_calendar() {
global $connection;
mysqli_select_db($connection);
$query = ("SELECT month, GROUP_CONCAT(start_date) as data FROM events GROUP BY month");
$result = $connection->query($query);
$str = "";
while ($row = $result->fetch_assoc()) {
echo $row['month'];
echo $row['start_date'];
}
return $str;
}
The month values show up, but the start_date values don't.