更新 '2.1.cpp'

This commit is contained in:
Kirigaya Kazuto 2017-09-12 13:48:01 +08:00
parent 7dc1739ac7
commit a522a9f76f

View File

@ -32,12 +32,12 @@ int main()
}); });
conn.exec("use bigdata5",nullptr); conn.exec("use bigdata5",nullptr);
conn.exec("select job_city,salary from lagou_job",[&](MySQLResult& res) conn.exec("select job_city,salary from pages",[&](MySQLResult& res)
{ {
res.stepRow([&](char** val,unsigned long* len) res.stepRow([&](char** val,unsigned long* len)
{ {
string city(val[0]); string city(val[0]);
cash_pack pk=ParseCash(val[1]); cash_pack pk=ParseCashX(val[1]);
mp[Trim(city)].push_back(pk); mp[Trim(city)].push_back(pk);
}); });
}); });