Files
website/includes/chat_reading_model.inc.php
masiv_ 14866f6b25
All checks were successful
Website Sync / website-sync (push) Successful in 7s
Add option to make comments invisible (not having to delete them). This is for moderation purposes.
2026-02-12 20:03:54 -03:00

16 lines
343 B
PHP

<?php
declare(strict_types=1);
function retrieve_chat_history(object $pdo){
$query = "SELECT username, content, date_sent FROM comments WHERE visible=true;";
$stmt = $pdo->prepare($query);
$stmt->execute();
$chat_history = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt = null;
$query = null;
return $chat_history;
}