From e143770fc296e34862d95272fc79a56fa9d20a34 Mon Sep 17 00:00:00 2001 From: Georgi Nikolov Date: Sat, 25 Jan 2025 17:01:26 +0200 Subject: Added additional table column for the favicon in the database With that commit handled the saving of that favicon as well --- models/database.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'models/database.php') diff --git a/models/database.php b/models/database.php index 62f5b10..f472dbb 100644 --- a/models/database.php +++ b/models/database.php @@ -33,6 +33,13 @@ abstract class Table { return $id; } + static protected function _get_entries_count(string $table) : int { + $conn = Table::connect(); + $query = $conn->query("SELECT count(*) FROM $table"); + $conn = null; + return $query->fetchColumn(); + } + static protected function _update(string $table, string $sets, string $identify) { $conn = Table::connect(); $query = $conn->query("UPDATE $table SET $sets WHERE $identify"); -- cgit v1.2.3