Merge pull request 'Add option to make comments invisible (not having to delete them). This is for moderation purposes.' (#3) from development into main
All checks were successful
Website Sync / website-sync (push) Successful in 6s
All checks were successful
Website Sync / website-sync (push) Successful in 6s
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
function retrieve_chat_history(object $pdo){
|
||||
$query = "SELECT username, content, date_sent FROM comments;";
|
||||
$query = "SELECT username, content, date_sent FROM comments WHERE visible=true;";
|
||||
|
||||
$stmt = $pdo->prepare($query);
|
||||
$stmt->execute();
|
||||
|
||||
@@ -2,6 +2,7 @@ CREATE TABLE comments (
|
||||
id INT(11) NOT NULL AUTO_INCREMENT,
|
||||
username VARCHAR(255) NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
visible BOOLEAN DEFAULT 1,
|
||||
date_sent DATETIME DEFAULT CURRENT_TIME,
|
||||
users_id INT(11) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
|
||||
Reference in New Issue
Block a user