1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +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 = ?;",
CONNECTION_BOTH );
/*prepareStatement( LAND_INS,
"INSERT INTO land ( LandSetId ) VALUES ( ? );",
prepareStatement( FC_SEL_ALL,
"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 );
prepareStatement( LAND_SEL,
"SELECT LandSetId, 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 "
"FROM land WHERE LandSetId = ?;",
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 = ?;",
CONNECTION_BOTH );
prepareStatement( FC_DEL,
"DELETE FROM freecompany WHERE FreeCompanyId = ?;",
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_DEL,
FC_SEL_ALL,
FC_INS,
FC_UP,
FC_DEL,
MAX_STATEMENTS
};