ofxMySQL - oF beginner's question

Hi everyone,

I’m very, very new to oF and one of the first projects I would like to get started on soon includes grabbing all values out of a MySQL database.

I’m using the ofxMySQL addon and apparently it seems to be connecting fine so far, thanks to this-thread. However, and I do apologize for the simplicity of this question, I haven’t really been able to figure out how to use the addon properly. Unfortunately I don’t really understand what a lot of the error messages mean yet, but if someone could give me a clue as to how I can make this work, I would really appreciate it.

As I said, all I’m trying to do is grab all the data in my database.

void testApp::testFunc()
//connect to the database
db.ofxMySQL::connect(“”, “root”, “administrator”, “database”);

//allocate a vector to hold values
vector vals;

db.ofxMySQL::getStrings(vals, “table”, “*”);


The last line gives me the error "no matching member function for call to ‘getStrings’.

I’m probably lacking some fundamental knowledge here. I know the newbie questions aren’t intensely popular, but I’m only posting now because I’ve had trouble finding useful tutorials and otherwise sufficient information.

I would be very grateful for any help/advice. Thanks

the built in getStrings() in ofxMySQL has a first argument that is a vector not a vector. so if you change the datatype of vals it should work :slight_smile:

Thank you very much for your quick reply. That did the trick.
Starting to understand a little more of how this works now.