更新 '3.1.cpp'

This commit is contained in:
Kirigaya Kazuto 2017-09-17 20:43:23 +08:00
parent 67f514a15c
commit a017dfc5a5

16
3.1.cpp
View File

@ -68,6 +68,8 @@ int main()
<<keywords[i][j]<<"%') or (tags like '%"
<<keywords[i][j]<<"%')) ";
sqlcmd=ostr.str();
conn.exec("use bigdata5",nullptr);
conn.exec(sqlcmd,[&](MySQLResult& res)
{
@ -76,6 +78,20 @@ int main()
cashvec[i].push_back(ParseCashX(val[0]));
});
});
ostr.str("");
ostr<<"select salary from pages where title like '%"<<keywords[i][j]<<"%' ";
sqlcmd=ostr.str();
conn.exec("use bigdata2",nullptr);
conn.exec(sqlcmd,[&](MySQLResult& res)
{
res.stepRow([&](char** val,unsigned long* len)
{
cashvec[i].push_back(ParseCashX(val[0]));
});
});
}
}