fix 500 error
Deploy / deploy (push) Successful in 31s

This commit is contained in:
2026-05-07 23:56:43 +02:00
parent d812e7d926
commit 8c483b59b6
2 changed files with 25 additions and 9 deletions
+17 -3
View File
@@ -14,10 +14,24 @@ $sql = "SELECT id, action, ip, user_agent, details, created_at FROM activity_log
$stmt = mysqli_prepare($conn, $sql);
mysqli_stmt_bind_param($stmt, 'i', $user_id);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
mysqli_stmt_store_result($stmt);
$entries = [];
while ($row = mysqli_fetch_assoc($result)) {
$entries[] = $row;
$id = 0;
$action = '';
$ip = '';
$user_agent = '';
$details = '';
$created_at = '';
mysqli_stmt_bind_result($stmt, $id, $action, $ip, $user_agent, $details, $created_at);
while (mysqli_stmt_fetch($stmt)) {
$entries[] = [
'id' => $id,
'action' => $action,
'ip' => $ip,
'user_agent' => $user_agent,
'details' => $details,
'created_at' => $created_at,
];
}
mysqli_stmt_close($stmt);