I've read the tutorial at, and I generally get how that works: http://tangentsoft.net/mysql++/doc/html/userman/tutorial.html#simple
I am trying to build this mysql++ code, and I'm getting an error:
std::ostringstream query3;
query3<<"select pipe_id from pipe where version_id='"<<id<<"'";
std::storeQueryResult ares=query3.store();
for(size_t i=0;i<ares.num_rows();i++)
cout<<ares[i]["version_id"]<<ares[i]["pipe_id"]<<std::endl;
mysql_query(&mysql,query3.str().c_str());
The error is that store
is not a member of ostringstream
. I'm not sure how to correct the problem.
Hi Merlyn,
Thanks for the code and looking at my problem.
I tried the above code but again I am getting the error
error: request for member 'query' in 'connection' which is non-class type 'MYSQL*'
on this line of code
// Construct a query object with the query string mysqlpp::Query query =
connection.query(query_string);
kindly help where I am going wrong?