diff --git a/chat.php b/chat.php index 86b070a..bfac820 100644 --- a/chat.php +++ b/chat.php @@ -28,7 +28,7 @@ function show_messages() SELECT `msg`, `msgdate`, - (SELECT `login` FROM `users` WHERE `users`.`id` = `uid`) AS `from`, + (SELECT `login` FROM `users` WHERE `users`.`id` = `user_id`) AS `from`, `type` FROM `chat` ORDER BY `id` LIMIT 50'); while ($message = $chat->fetch_assoc()) {