1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 22:57:45 +00:00

Basic db statements for main fc table

This commit is contained in:
Mordred 2023-02-02 22:46:37 +01:00
parent a4a2423b84
commit 4bb35c8bb8
2 changed files with 25 additions and 17 deletions

View file

@ -356,25 +356,29 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements()
"DELETE FROM infolinkshell WHERE LinkshellId = ?;", "DELETE FROM infolinkshell WHERE LinkshellId = ?;",
CONNECTION_BOTH ); CONNECTION_BOTH );
/*prepareStatement( LAND_INS, prepareStatement( FC_SEL_ALL,
"INSERT INTO land ( LandSetId ) VALUES ( ? );", "SELECT FreeCompanyId, MasterCharacterId, FcName, FcTag, FcCredit, FcCreditAccumu, FcRank, FcPoint, CrestId, CreateDate, GrandCompanyID, "
" 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 ( ?, ?, ?, ?, ?, ?, ?,"
" ?, ?, ?, ?, ?, ?, ?, ? );",
CONNECTION_BOTH ); CONNECTION_BOTH );
prepareStatement( LAND_SEL, prepareStatement( FC_UP,
"SELECT LandSetId, Size, houseState, iconColor, iconAddIcon, fcId, fcIcon, fcIconColor, exteriorRoof, " "UPDATE freecompany SET MasterCharacterId = ?, FcName = ?, FcTag = ?, FcCredit = ?, FcCreditAccumu = ?,"
"exteriorWall, exteriorWindow, exteriorDoor, otherFloorWall, otherFloorFlooring, basementWall, " " FcRank = ?, FcPoint = ?, ReputationList = ?, CrestId = ?,"
"gardenSign, colorSlot_0, colorSlot_1, colorSlot_2, colorSlot_3, colorSlot_4, colorSlot_5, " " CreateDate = ?, GrandCompanyID = ?, FcStatus = ?, FcBoard = ?, "
"colorSlot_6, colorSlot_7, ownerPlayerId, nextDrop, dropCount, currentPrice " " FcMotto = ?, ActiveActionList = ?, , ActiveActionLeftTimeList = ?, StockActionList = ? "
"FROM land WHERE LandSetId = ?;", " WHERE FreeCompanyId = ?;",
CONNECTION_BOTH );
prepareStatement( FC_DEL,
"DELETE FROM freecompany WHERE FreeCompanyId = ?;",
CONNECTION_BOTH ); CONNECTION_BOTH );
prepareStatement( LAND_UP,
"UPDATE land SET Size = ?, houseState = ?, iconColor = ?, iconAddIcon = ?, fcId = ?, "
"fcIcon = ?, fcIconColor = ?, exteriorRoof = ?, exteriorWall = ?, exteriorWindow = ?, "
"exteriorDoor = ?, otherFloorWall = ?, otherFloorFlooring = ?, basementWall = ?, gardenSign = ?, "
"colorSlot_0 = ?, colorSlot_1 = ?, colorSlot_2 = ?, colorSlot_3 = ?, colorSlot_4 = ?, "
"colorSlot_5 = ?, colorSlot_6 = ?, colorSlot_7 = ?, ownerPlayerId = ?, nextDrop = ?, "
"dropCount = ?, currentPrice = ?"
" WHERE LandSetId = ?;",
CONNECTION_BOTH );*/
} }

View file

@ -115,6 +115,10 @@ namespace Sapphire::Db
LINKSHELL_UP, LINKSHELL_UP,
LINKSHELL_DEL, LINKSHELL_DEL,
FC_SEL_ALL,
FC_INS,
FC_UP,
FC_DEL,
MAX_STATEMENTS MAX_STATEMENTS
}; };