iologindata.cpp
Console errors when the player connect
how fix?
C++:
void IOLoginData::updateOnlineStatus(uint32_t guid, bool login, bool broadcasting, const std::string& cast_password,
const std::string& cast_description, uint32_t spectators)
{
if (g_config.getBoolean(ConfigManager::ALLOW_CLONES)) {
return;
}
Database* db = Database::getInstance();
std::ostringstream query;
if (login) {
query << "INSERT INTO `players_online` (`player_id`, `broadcasting`, `password`, `description`, `spectators`) VALUES "
"(" << guid << ", " << broadcasting << ", " << db->escapeString(cast_password) << ", " << db->escapeString(cast_description) << ", " << spectators << ")";
} else {
query << "UPDATE `players_online` SET "
"`broadcasting` = " << broadcasting << ", "
"`password` = " << db->escapeString(cast_password) << ", "
"`description` = " << db->escapeString(cast_description) << ", "
"`spectators` = " << spectators << " "
" WHERE `player_id` = " << guid;
}
db->executeQuery(query.str());
}
Console errors when the player connect
Code:
[Error - mysql_real_query] Query: INSERT INTO `players_online` (`player_id`, `broadcasting`, `password`, `description`, `spectators`) VALUES (1, 0, '', '', 0)
Message: Unknown column 'broadcasting' in 'field list'
how fix?