PGD Home

mySQL Integration for T3D 3.6 (file download)

by on Jan.30, 2016, under Astral Realms, P-0, Software and Games, Spiritus Astrum, Tutorials

I have completed my integration of the great mySQL tutorial from my previous post (HERE).

I have left it at a fairly basic level, because the rest of the integration will be dependent on the individual applications it is being used for.

 

To integrate this resource, follow the following steps:
First, set up your actual mySQL database, verify that ports are forwarded, etc, this is beyond the scope of this tutorial.

Second, install and run the mySQL ODBC connector from HERE. According to the tutorial in my previous post, it is important to use the 32-bit connector, even on a 64-bit machine. The tutorial (available HERE) also covers how to set up this connector.

Thirdly, download my modified mySQL.cpp file from my  site HERE.
Add it to your project, and that should be all you need to do.

querydatabase() has code in it that is more for testing than production, but it does show how to implement key features.

Freeing up resources and closing the connection is also something that could be optimised further, depending on how a developer wanted their application to run.
I have made four functions available to script:

connecttodatabase(“username”,”password”);

querydatabase(“sqlquery”); //such as:¬† querydatabase(“SELECT * from users”);

freedatabaseresources();

and:

testdb();

which just calls the c++ testdatabase() function.

 

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!