im cherry picking with no problems bro :D thank the code what a bit different in your code
changed this
if (!query_insert.addRow(fmt::format("{:d}, {:d}, {:d}, {:d}, {:d}, {:s}", player->getGUID(), pid, runningId,
item->getID(), item->getSubType()...