From 32b1a5badaf8169565077cd42995e08231829656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 15 Mar 2012 20:16:24 +0100 Subject: [PATCH] Fixed bad fix + use fetchColumn --- file/lib/data/chat/room/ChatRoomAction.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/file/lib/data/chat/room/ChatRoomAction.class.php b/file/lib/data/chat/room/ChatRoomAction.class.php index 4ebdacc..dc24404 100644 --- a/file/lib/data/chat/room/ChatRoomAction.class.php +++ b/file/lib/data/chat/room/ChatRoomAction.class.php @@ -8,7 +8,7 @@ * @author Tim Düsterhus * @copyright 2010-2012 Tim Düsterhus * @license Creative Commons Attribution-NonCommercial-ShareAlike - * @package timwolla.wcf.chat + * @package be.bastelstu.wcf.chat * @subpackage data.chat.room */ class ChatRoomAction extends \wcf\data\AbstractDatabaseObjectAction { @@ -39,10 +39,9 @@ public function create() { FOR UPDATE"; $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute(); - $row = $stmt->fetchArray(); $sql = "UPDATE wcf".WCF_N."_chat_room - SET position = ".($row['max'] + 1)." + SET position = ".($stmt->fetchColumn() + 1)." WHERE roomID = ?"; $stmt = WCF::getDB()->prepareStatement($sql); $stmt->execute(array($room->roomID));