you could use std::string class and just concantinate the value with the string
std::string query = "SELECT * FROM table1 WHERE id = ";
query += value;
now the problem is that if
value is a string you will probably have to enclose it in quotes
std::string query = "SELECT * FROM table1 WHERE id = '";
query += value;
query += "'";
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,953 posts
since Aug 2005