mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Fixed bad fix + use fetchColumn
This commit is contained in:
parent
a1f939d763
commit
32b1a5bada
@ -8,7 +8,7 @@
|
||||
* @author Tim Düsterhus
|
||||
* @copyright 2010-2012 Tim Düsterhus
|
||||
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
|
||||
* @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));
|
||||
|
Loading…
Reference in New Issue
Block a user