Counter styling

This commit is contained in:
Kilian committed 2024-06-27 16:37:58 +02:00
1 parent 15b264ded2
commit fac22f76c6
7 files changed
+55 -23

No files matched your search

@@ -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();
}