So I downloaded the c++/mysql connector from http://dev.mysql.com/downloads/connector/cpp/
Now I want to store data that I've retrieved from the database to a variable. This is as far as I've gotten.
string str;
/////////////////////////////////get data from database////////////////////////////////////////////////////////
sql::Driver *driver;
sql::Connection *con;
sql::Statement *stmt;
sql::ResultSet *res;
/* Create a connection */
driver = get_driver_instance();
con = driver->connect("tcp://127.0.0.1:3306", "root", "");
/* Connect to the MySQL test database */
con->setSchema("awesome");
stmt= con->createStatement();
res = stmt->executeQuery(
"SELECT * FROM master where choice='Y'");
/////////////////////////////Store it somewhere///////////////////////////////
str= res->getString("rfid");
Any and all help is welcomed