diff options
| author | Syndamia <kamen@syndamia.com> | 2025-02-09 20:52:35 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-02-09 20:52:35 +0200 |
| commit | ae8b6f88a0c31703d5e846fd1717a26b74d5da3b (patch) | |
| tree | f4bbffc0670e46450acba673c819672b28d89f26 /models/webpage.php | |
| parent | aac3a0fa5072525edb4e271a61047624781567e4 (diff) | |
| download | nowayforward_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.php | 9 |
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", |
