1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-05 03:24:41 +00:00

Add files via upload

This commit is contained in:
だいちまる
2023-08-21 13:57:56 +09:00
committed by GitHub
parent 965d7b903c
commit 76cf76475c
21 changed files with 453 additions and 181 deletions
+5 -6
View File
@@ -41,6 +41,11 @@ if (!empty($pdo)) {
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
));
$messageQuery = $dbh->prepare("SELECT title,msg,url,datetime,userchk FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT $offset, $itemsPerPage");
$messageQuery->bindValue(':userid', $userid);
$messageQuery->execute();
$message_array = $messageQuery->fetchAll();
// トランザクション開始
$pdo->beginTransaction();
@@ -52,12 +57,6 @@ if (!empty($pdo)) {
$res = $stmt->execute();
$res = $pdo->commit();
$messageQuery = $dbh->prepare("SELECT title,msg,url,datetime,userchk FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT $offset, $itemsPerPage");
$messageQuery->bindValue(':userid', $userid);
$messageQuery->execute();
$message_array = $messageQuery->fetchAll();
if (!empty($message_array)) {
foreach ($message_array as $value) {
$messageDisplay = new MessageDisplay($value); // userid を渡さない