Databasing throught Torque
by Spencer Simonsen · in Technical Issues · 02/08/2007 (6:50 pm) · 6 replies
Does anyone know how to connent to a mysql database on a website in order to upload new accounts from a game or to check account for a game? and will this need engine edits? This is for TGE 1.5.
About the author
#2
02/08/2007 (7:54 pm)
Ok, i got the writing to the database part, by connecting through a php page, but i'm not sure how to pull data from the database and send it into TGE. Also, does the engine need to be edited to do these things, i seem to remember editing in 1.4 but is it needed in 1.5?
#3
If your curious about how to use Maxwell's method, look up my recent .plans -- I recently posted an "httpPage" torquescript class that allows you to retrieve web-page results ... and you can pass the page data using the querystring.
02/09/2007 (6:30 am)
@Spencer, Torque does not provide database support "out of the box" ... you can use a C++ resource to add this functionality, or you can use Maxwell's method by "faking" it --If your curious about how to use Maxwell's method, look up my recent .plans -- I recently posted an "httpPage" torquescript class that allows you to retrieve web-page results ... and you can pass the page data using the querystring.
#5
02/09/2007 (2:02 pm)
Thanks for all your help guys, i'll try to implement these features in my game, if you have any other links or resources you feel could help me, please post them.
#6
02/10/2007 (5:28 pm)
@Spencer, if you look at the recent resources I've posted -- one of them is an XMLObject that allows you to 'sax' parse XML fragments (or documents) -- this could be useful for transferring data back and forth from the web server to the game client in an 'agnostic' manner (ie; rather then sending TorqueScript back to be eval()'d or "INI Style" var=val strings -- you could allow for additional programs to easily hook into your scripts and expose the DTD for the documents for these programs to adhere to -- )



Torque 3D Owner Max
If you do this, make sure you secure all of your data.