Страница со статистикой

Сделана основа для страницы со статистикой и несколько функций в бэке для неё
This commit is contained in:
2024-02-01 13:20:39 +03:00
parent 751476c4f8
commit de456dea0a
8 changed files with 142 additions and 9 deletions

View File

@@ -22,6 +22,19 @@ if ($IS_FRONTEND) {
// Functions
/*
* FUNCTION
* Get comments amount
*/
function Comments_GetTotalAmount (): int {
global $db;
$qr = $db->query("SELECT COUNT(*) FROM comments");
$row = $qr->fetch_row();
return $row[0];
}
/*
* FUNCTION
* Get comments from range of selected comment section