|
$replied = $site->db->query("SELECT parent, MAX(`timestamp`) AS maxTimestamp FROM " . PREFIX . "replies WHERE type = 'ticket' GROUP BY parent");
if ($replied = $site->db->query($sQry))
{
while ($ticket = $replied->fetch_assoc())
{
printf("Max timestamp for parent %s is %s" . PHP_EOL, $ticket['parent'], $ticket['maxTimestamp']);
}
$replied->free();
}
I tried this as well
|