Sign in to follow this  
  • entries
    32
  • comments
    30
  • views
    10732

Ah yup.

Sign in to follow this  
Lacutis

112 views

Ok, so apparently I'm a retard.

I dug around on google for about a half hour and dug up a tutorial for mysql. Between that and the example program that actually came with the server it took me about an hour to get the connection up and running.

I'm not sure why I didn't look into mysql before this, it really is ridiculously simple to set up a db connection and call a query.

Now I'm going to wrap it into a class to make it easier to call queries and call it done. I'm going to wrap it similair to how I did for another system, just overload the () operator so I can do this:


CMySql Query("SELECT * FROM TEST WHERE EntityId > 5");

if(Query.IsOpen())
{
while(!Query.EOF())
{
printf("EntityId: %s Value: %s", Query(0), Query(1));
Query.Next();
}
}



So I guess the next step is to finish the entity classes and make tables in the database to represent them.

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now