elliotwoods/ofxMySQL — Issue #1: Using addon
Author: danlopez00
Created: 2012-02-14 21:09:18+00:00
State: open

Hi Elliot,

Trying to use your ofxMysql addon

I just cant seem to get it to work.

I am using ofx v007 and your latest code from gitHub

I drag and drop your code folder into the addons group folder in Xcode. In my testApp.h I include ofxMySQL.h then in my .cpp try to connect.

testApp.h
//----------------------------------

#include "ofxMySQL.h"

class testApp : public ofBaseApp{

public:

........

ofxMySQL db;

........

testApp.cpp
//----------------------------------

void testApp::logClicked()
{
db.ofxMySQL::connect("127.0.0.1", "root", "passwd", "test");

vector vals("val", "1");

db.ofxMySQL::insert("test_a", vals);

//store data in mysql or db
printf("LOG: store in mysql\n");
}