This is a follow-up of my old post of
http://lists.mysql.com/plusplus/7080
I ran into it again, and looked up your answer and couldn't get it to
work. My solution last time was to flip the %0 and %1, but Warren
suggested casting the second parameter to mysqlpp::String, but it's an
int and it doesn't like that. I tried casting the first parameter and
that still thought the string was the entire SQL statement. What did I
miss?
query << "SELECT " GET_GETSET_COLS " FROM
`getset_server_config_values` "
" WHERE server_name=%0q and engine_instance_id = %1";
query.parse();
LOG4CPLUS_TRACE( m_logger, query.str(serverName,serverInstanceId)
);
query.store(serverName,serverInstanceId) ); <<< this gets mixed up
with passing in a SQL statement as string
// this works
SQLQueryParms sp;
sp.set( serverName, serverInstanceId );
results = query.store( sp );