Working with Visual Studio, Windows 7 and mysql.h library.
What I want to do is send a MySQL query like this:
mysql_query(conn, \"SELECT pass FROM us
here is an example:
#include #include #include using namespace std; /// ... string name_value = "Leo Tolstoy"; ostringstream strstr; strstr << "SELECT pass FROM users WHERE name='" << name_value << "'"; string str = strstr.str(); mysql_query(conn, str.c_str());