代码
出错代码段
bool CGameServer::getAccountInfoByUserId(int user_id, UserAccountData& data) {
if (connectToLocalDB()) {
log_error("connect to db failed");
return false;
}
TLIB_DB_LINK *pTempDBLink = &m_stLDBLink;
snprintf(pTempDBLink->sQuery[0], sizeof(pTempDBLink->sQuery[0]),
"select bind_mark, account, password, state, device_mark, country, tunnel, \
register_version, transfer_code, bind_equipment from account_data where \
user_id=%d", user_id);
//......
if (pTempDBLink->stRow[i]) {
data._transfer_code = pTempDBLink->stRow[i++];
}
if (pTempDBLink->stRow[i]) {
data._bind_equipment = atoi(pTempDBLink->stRow[i++]);
}
//......
[Read More]