Counter styling

This commit is contained in:
2024-06-27 16:37:58 +02:00
parent 15b264ded2
commit fac22f76c6
7 changed files with 55 additions and 23 deletions
@@ -0,0 +1,20 @@
<?php
include_once dirname(__FILE__) . "/./queries.php";
function getHits($id, $db)
{
global $getHitsQuery;
$stmt = $db->prepare($getHitsQuery);
$stmt->bindValue(":SID", $id);
$stmt->execute();
$hits = $stmt->fetch(PDO::FETCH_COLUMN);
return $hits !== false ? $hits : 0;
}
function addHit($id, $db)
{
global $setHitsQuery;
$stmt = $db->prepare($setHitsQuery);
$stmt->bindValue(":SID", $id);
$stmt->execute();
}