<?php
use Carbon\Carbon;
$now = Carbon::now()->format('d/m/Y');
printf("Today is %s\nCurrent PHP version: %s \n\n", $now, phpversion());
$query = " //select category_name from category";
select o.object_name,c.category_name
,(select group_concat(variation_name)
from variations v where v.object_id=o.id) variations
from objects o
left join category c on o.category_id=c.id;";
$stmt = $pdo->prepare($query);
$stmt->execute();
$rows = $stmt->fetch(PDO::FETCH_ASSOC);
printf('Selected: %s ' . PHP_EOL, count($rows));