diff --git a/file/lib/data/chat/room/ChatRoomAction.class.php b/file/lib/data/chat/room/ChatRoomAction.class.php index 44952f1..73b0aea 100644 --- a/file/lib/data/chat/room/ChatRoomAction.class.php +++ b/file/lib/data/chat/room/ChatRoomAction.class.php @@ -34,8 +34,8 @@ public function create() { $room = parent::create(); WCF::getDB()->beginTransaction(); - $sql = "SELECT max(position) as max - FROM wcf".WCF_N."_chat_room + $sql = "SELECT MAX(position) + FROM wcf".WCF_N."_chat_room FOR UPDATE"; $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute();