How do i get results from a query and print them as a string in c++?
Posted by: heath sargent
Date: April 13, 2012 09:15PM

I can connect to my mysql server alright by using "mysql::initialize", and i can send querys properly using mysql::execute("INSERT INTO users ect........") but i dont know how to print results when i use
mysql::execute("SELECT * FROM users WHERE username = 'heath'")
I know how to get the results with the normal mysql in c++, but not with mysqlpp, and the only reason im using mysqlpp is so i can use mysql globally :)

Summerised:
How do i get results from a query and print them as a string in c++

ALSO, how do i get the "connection" variable globally? i tried mysqlpp::connection; but thats not right :P



Edited 1 time(s). Last edit at 04/13/2012 09:21PM by heath sargent.

Options: ReplyQuote


Subject
Views
Written By
Posted
How do i get results from a query and print them as a string in c++?
1677
April 13, 2012 09:15PM


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.