So I was just checking out this and it looks like using template queries is, in part, the means by which an SQL statement is passed to MySQL++. So I guess that would be, in part, the route to take to create a MySQL statement with MySQL++.
// Establish the connection to the database server.
mysqlpp::Connection con(mysqlpp::examples::db_name,
cmdline.server(), cmdline.user(), cmdline.pass());
// Build a template query to retrieve a stock item given by
// item name.
mysqlpp::Query query = con.query(
"select * from stock where item = %0q");
query.parse();
Also, in response to:
is it like a real MySQL statement?
What's going on is that the compiler is taking your c++ code which contains the statement that you want to execute and then communicating with the MySQL db for you, at which point the 'real' SQL statement is used.