MySQL Forums
Forum List  »  Connector/C++

Outputting data from a database
Posted by: perry perry
Date: September 10, 2009 04:14PM

How can I output or use data from a database I created? I have tried something like this which is just the first example except I added this. name is a std::string.

res = stmt->executeQuery("SELECT 'name' FROM player WHERE 'id' = 1");
name = res;
cout << name;

but I get errors that it could not be converted to a string. Does anyone know of a good tutorial to explain this? Thanks

Options: ReplyQuote

Written By
Outputting data from a database
September 10, 2009 04:14PM
September 11, 2009 04:19PM
September 17, 2009 11:09AM
September 18, 2009 01:07AM
September 22, 2009 07:47PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.