Start on HW

This commit is contained in:
2024-06-21 13:51:15 +02:00
parent 32d4a62246
commit 15b264ded2
5 changed files with 81 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
include_once "./impl/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();
}