Author Topic: TS + PHP + SQL = Data storage?  (Read 612 times)

We all know that you can send commands to a PHP script on a webserver with TCPObjects. PHP has a library of MySQL functions. Why not put an SQL database on the webserver you're connecting to and use the PHP script previously mentioned to store/receive data? Maybe declare a var like $SQL::Query = "SELECT * FROM 'database'; and send it through the TCP connection to the PHP script, which will parse it.

Discuss, post potential methods, I might write a proof of concept later if I have time.
« Last Edit: August 11, 2012, 08:11:17 PM by mp7964 »

If you mean a blockland-controlled MySQL database, then yes it is possible, I've done that kind of thing before.

never understood why you can't just have fileobjects and have torquescript do all the mysql stuff itself

have torquescript do all the mysql stuff itself
One does not simply use Torque to do MySQL on a remote PHP server.
Unless I'm seriously understanding that post.

I have done this some time ago.

The PHP part is finished, but the torque part is just a test framework. ( no queues and other failsafe methods).

And there are many downsides when using PHP as a bridge...
-its not realtime
-you have to reconnect in order to to a new request
-sometimes a high delay (once i had a delay of 3000ms Oo)
-unreliable ( a webserver under high load may just refuse the connection)
-...

A better Idea would be to use an external program as a bridge. can be a simple program made with Java or C#/C++.

I may post some more details later. its to late right now (2:30 AM)


One does not simply use Torque to do MySQL on a remote PHP server.
Unless I'm seriously understanding that post.
just open the .db in a file object?