Собственно есть запрос
$sth = $db->query("SELECT SUM(`counter`) AS `news_read` FROM `dle_post_extras` WHERE `post_id` = ? AND `{$dtn}` > ?");
Где ошибка может быть? Вот сама ошибка...
The Error returned was:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? AND `2020-02-12` > ?' at line 1
{$dtn}
?