reading messages
This commit is contained in:
parent
08fe66906c
commit
f44c90647f
4 changed files with 21 additions and 2 deletions
|
@ -6,6 +6,16 @@ require(__DIR__ . "/../libs/comment.php");
|
|||
|
||||
$ref = 1732684297;
|
||||
|
||||
$stmt = $db->prepare("DELETE FROM main.read WHERE username = ?");
|
||||
$stmt->execute([$username]);
|
||||
|
||||
$stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date");
|
||||
$stmt->execute(["notification",$username]);
|
||||
$counter = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||
|
||||
$stmt = $db->prepare("INSERT INTO main.read (username, msgs) VALUES (?, ?)");
|
||||
$stmt->execute([$username, count($counter)]);
|
||||
|
||||
page_header();
|
||||
comments("notification", $username, true);
|
||||
page_footer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue