Fixed MySQL

This commit is contained in:
WolverinDEV 2020-08-19 20:11:09 +02:00
parent a80c90f025
commit a78c36c999

View File

@ -191,7 +191,7 @@ 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 OFFSET 1);", variable{":key", "lock_test"}}.execute();
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;