diff --git a/deps/mysqlConnector/Connection.cpp b/deps/mysqlConnector/Connection.cpp index 1da0042c..d307f1d4 100644 --- a/deps/mysqlConnector/Connection.cpp +++ b/deps/mysqlConnector/Connection.cpp @@ -237,7 +237,7 @@ std::shared_ptr< Mysql::PreparedStatement > Mysql::Connection::prepareStatement( throw std::runtime_error( "Could not init prepared statement: " + getError() ); if( mysql_stmt_prepare( stmt, sql.c_str(), static_cast< unsigned long >( sql.size() ) ) ) - throw std::runtime_error( "Could not prepare statement: " + getError() ); + throw std::runtime_error( "Could not prepare statement: " + sql + "\n" + getError() ); return std::make_shared< PreparedStatement >( stmt, shared_from_this() ); } diff --git a/src/common/Database/ZoneDbConnection.cpp b/src/common/Database/ZoneDbConnection.cpp index b9712207..85a1f3ae 100644 --- a/src/common/Database/ZoneDbConnection.cpp +++ b/src/common/Database/ZoneDbConnection.cpp @@ -358,23 +358,23 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements() prepareStatement( FC_SEL_ALL, "SELECT FreeCompanyId, MasterCharacterId, FcName, FcTag, FcCredit, FcCreditAccumu, FcRank, FcPoint, CrestId, CreateDate, GrandCompanyID, " - " ReputationList, FcStatus, FcBoard, FcMotto, ActiveActionList, ActiveActionLeftTimeList, StockActionList " + "ReputationList, FcStatus, FcBoard, FcMotto, ActiveActionList, ActiveActionLeftTimeList, StockActionList " "FROM freecompany " "ORDER BY FreeCompanyId ASC;", CONNECTION_SYNC ); prepareStatement( FC_INS, "INSERT INTO freecompany ( FreeCompanyId, MasterCharacterId, FcName, FcTag, FcCredit, FcCreditAccumu, FcRank, FcPoint," - " ReputationList, CrestId, CreateDate, GrandCompanyID, FcStatus, FcBoard, FcMotto ) VALUES ( ?, ?, ?, ?, ?, ?, ?," - " ?, ?, ?, ?, ?, ?, ?, ? );", + "ReputationList, CrestId, CreateDate, GrandCompanyID, FcStatus, FcBoard, FcMotto ) VALUES ( ?, ?, ?, ?, ?, ?, ?," + "?, ?, ?, ?, ?, ?, ?, ? );", CONNECTION_BOTH ); prepareStatement( FC_UP, "UPDATE freecompany SET MasterCharacterId = ?, FcName = ?, FcTag = ?, FcCredit = ?, FcCreditAccumu = ?," - " FcRank = ?, FcPoint = ?, ReputationList = ?, CrestId = ?," - " CreateDate = ?, GrandCompanyID = ?, FcStatus = ?, FcBoard = ?, " - " FcMotto = ?, ActiveActionList = ?, , ActiveActionLeftTimeList = ?, StockActionList = ? " - " WHERE FreeCompanyId = ?;", + "FcRank = ?, FcPoint = ?, ReputationList = ?, CrestId = ?," + "CreateDate = ?, GrandCompanyID = ?, FcStatus = ?, FcBoard = ?, " + "FcMotto = ?, ActiveActionList = ?, ActiveActionLeftTimeList = ?, StockActionList = ? " + "WHERE FreeCompanyId = ?;", CONNECTION_BOTH ); prepareStatement( FC_DEL,