aboutsummaryrefslogtreecommitdiff
path: root/models/database.php
diff options
context:
space:
mode:
authorGeorgi Nikolov <ggeorgi60@gmail.com>2025-01-25 17:01:26 +0200
committerGeorgi Nikolov <ggeorgi60@gmail.com>2025-01-25 17:01:26 +0200
commite143770fc296e34862d95272fc79a56fa9d20a34 (patch)
tree2bcbf53e686619bddec5da28d5775656b26b5ea0 /models/database.php
parentdb285a4be28e6da35be65424b2f324dd04e9becf (diff)
downloadnowayforward_human-e143770fc296e34862d95272fc79a56fa9d20a34.tar
nowayforward_human-e143770fc296e34862d95272fc79a56fa9d20a34.tar.gz
nowayforward_human-e143770fc296e34862d95272fc79a56fa9d20a34.zip
Added additional table column for the favicon in the database
With that commit handled the saving of that favicon as well
Diffstat (limited to 'models/database.php')
-rw-r--r--models/database.php7
1 files changed, 7 insertions, 0 deletions
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");