{"id":2290,"date":"2016-01-30T23:40:15","date_gmt":"2016-01-30T23:40:15","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=2290"},"modified":"2016-01-30T23:40:15","modified_gmt":"2016-01-30T23:40:15","slug":"mysql-integration-for-t3d-3-6-file-download","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/mysql-integration-for-t3d-3-6-file-download\/","title":{"rendered":"mySQL Integration for T3D 3.6 (file download)"},"content":{"rendered":"<p>I have completed my integration of the great mySQL tutorial from my previous post (<a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/?p=2285\">HERE<\/a>).<\/p>\n<p>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.<\/p>\n<p>&nbsp;<\/p>\n<p>To integrate this resource, follow the following steps:<br \/>\nFirst, set up your actual mySQL database, verify that ports are forwarded, etc, this is beyond the scope of this tutorial.<\/p>\n<p>Second, install and run the mySQL ODBC connector from <a href=\"http:\/\/dev.mysql.com\/downloads\/connector\/odbc\/5.1.html\">HERE<\/a>. 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 <a href=\"https:\/\/bobobobo.wordpress.com\/2009\/07\/11\/working-with-odbc-from-c\/#\">HERE<\/a>) also covers how to set up this connector.<\/p>\n<p>Thirdly, download my modified mySQL.cpp file from my \u00a0site <a href=\"http:\/\/www.phoenixgamedevelopment.com\/downloads\/mysql.cpp\">HERE<\/a>.<br \/>\nAdd it to your project, and that should be all you need to do.<\/p>\n<p>querydatabase() has code in it that is more for testing than production, but it does show how to implement key features.<\/p>\n<p>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.<br \/>\nI have made four functions available to script:<\/p>\n<p>connecttodatabase(&#8220;username&#8221;,&#8221;password&#8221;);<\/p>\n<p>querydatabase(&#8220;sqlquery&#8221;); \/\/such as:\u00a0 querydatabase(&#8220;SELECT * from users&#8221;);<\/p>\n<p>freedatabaseresources();<\/p>\n<p>and:<\/p>\n<p>testdb();<\/p>\n<p>which just calls the c++ testdatabase() function.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. &nbsp; To integrate this resource, follow the following steps: First, set up your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,10,11,12],"tags":[],"class_list":["post-2290","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-software-and-games","category-spiritus-astrum","category-tutorials","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2290"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=2290"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2290\/revisions"}],"predecessor-version":[{"id":2291,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2290\/revisions\/2291"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=2290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=2290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=2290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}