mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-06 07:18:42 +00:00
Saving to database working
This commit is contained in:
14
dDatabase/GameDatabase/MySQL/Tables/Behaviors.cpp
Normal file
14
dDatabase/GameDatabase/MySQL/Tables/Behaviors.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "IBehaviors.h"
|
||||
|
||||
#include "MySQLDatabase.h"
|
||||
|
||||
void MySQLDatabase::AddBehavior(const IBehaviors::Info& info) {
|
||||
ExecuteInsert(
|
||||
"INSERT INTO behaviors (behavior_info, character_id, behavior_id) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE behavior_info = ?",
|
||||
info.behaviorInfo, info.characterId, info.behaviorId, info.behaviorInfo
|
||||
);
|
||||
}
|
||||
|
||||
void MySQLDatabase::RemoveBehavior(const uint32_t behaviorId) {
|
||||
ExecuteDelete("DELETE FROM behaviors WHERE behavior_id = ?", behaviorId);
|
||||
}
|
Reference in New Issue
Block a user