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


Subject
Views
Written By
Posted
Outputting data from a database
4395
September 10, 2009 04:14PM
2273
September 11, 2009 04:19PM
2189
September 17, 2009 11:09AM
2146
September 18, 2009 01:07AM
2003
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.