aboutsummaryrefslogtreecommitdiff
path: root/models/webpage.php
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-02-09 20:52:35 +0200
committerSyndamia <kamen@syndamia.com>2025-02-09 20:52:35 +0200
commitae8b6f88a0c31703d5e846fd1717a26b74d5da3b (patch)
treef4bbffc0670e46450acba673c819672b28d89f26 /models/webpage.php
parentaac3a0fa5072525edb4e271a61047624781567e4 (diff)
downloadnowayforward_human-ae8b6f88a0c31703d5e846fd1717a26b74d5da3b.tar
nowayforward_human-ae8b6f88a0c31703d5e846fd1717a26b74d5da3b.tar.gz
nowayforward_human-ae8b6f88a0c31703d5e846fd1717a26b74d5da3b.zip
feat: Better home cards, show total view count of pages
Diffstat (limited to 'models/webpage.php')
-rw-r--r--models/webpage.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/models/webpage.php b/models/webpage.php
index 90ffb45..a42c300 100644
--- a/models/webpage.php
+++ b/models/webpage.php
@@ -70,6 +70,15 @@ class Webpage extends Table {
);
}
+ function totalViewCount() : int {
+ return Table::_get_all(
+ 'Webpages',
+ 'Database\Webpage',
+ "WHERE URL = \"$this->URL\"",
+ "SUM(Visits) as WID"
+ )[0]->WID;
+ }
+
function previousPageId() : int {
$foundId = Table::_get_all(
"Webpages",