When passing values like 'ASC' or 'DESC' to prepare like:
[...]
$order = 'DESC';
[... (the whole query)], $order); // (as a prepare param)
it doesn't work because the resulting query from something like:
[...] group_concat(p.id ORDER BY p.post_date %s)
Will be:
[...] group_concat(p.id ORDER BY p.post_date 'DESC')
While should be:
[...] group_concat(p.id ORDER BY p.post_date DESC)
How to solve?