Fixed MySQL
This commit is contained in:
parent
a78c36c999
commit
4a7a9e7228
@ -86,8 +86,8 @@ void WebClient::initialize() {
|
||||
}
|
||||
};
|
||||
|
||||
this->ws_handler.on_connect = bind(&WebClient::onWSConnected, this);
|
||||
this->ws_handler.on_disconnect = bind(&WebClient::onWSDisconnected, this, placeholders::_1);
|
||||
this->ws_handler.on_connect = std::bind(&WebClient::onWSConnected, this);
|
||||
this->ws_handler.on_disconnect = std::bind(&WebClient::onWSDisconnected, this, placeholders::_1);
|
||||
|
||||
this->ws_handler.callback_data([&](const pipes::WSMessage& msg){
|
||||
this->onWSMessage(msg);
|
||||
|
@ -191,10 +191,12 @@ bool SqlDataManager::initialize(std::string& error) {
|
||||
return false;
|
||||
}
|
||||
|
||||
res = sql::command{this->sql(), "DELETE FROM `general` WHERE `id` IN (SELECT `id` FROM `general` WHERE `key` = :key ORDER BY `key` LIMIT 1, -1);", variable{":key", "lock_test"}}.execute();
|
||||
if(!res) {
|
||||
error = res.fmtStr();
|
||||
return false;
|
||||
if(this->sql()->getType() == sql::TYPE_SQLITE) {
|
||||
res = sql::command{this->sql(), "DELETE FROM `general` WHERE `id` IN (SELECT `id` FROM `general` WHERE `key` = :key ORDER BY `key` LIMIT 1, -1);", variable{":key", "lock_test"}}.execute();
|
||||
if(!res) {
|
||||
error = res.fmtStr();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user