Counter styling
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user