- Home /
Database and Unity
Alright, I have been using the MYSQL database for storing information. I send and recive information while using PHP for the negotiation. The information is sent with a string of numbers, gets broken in to parts by the PHP and gets stored in the database. I do the same from the database back to the client. For example, the client sends a url ( Soemthing like : www.hostingsite.com/PhpFile.php?username=(clientsUser)&type=(TypeOfInfo)&secretkey=(secret negotiation key)
Now the PHP file gets the info from the database and sets it as a long string: (Number of tokens stored in the database = 26 so it'll be placed like 0026 because the maximum number of tokens is 9999 and its known for the game AND the database. So the game knows that the first four numbers are the tokens value and breaks the number to the value of 26. Now in the end the returned info looks like 00200034000140005342091419 and the client breaks it correctly but my question is: is there any other easier,quicker,lighter,optimized method to share the information?
Please, help me out.
Well it's certainly a reasonable way of doing it - other ways would be slower but more maintainable probably - though you could send a byte array I guess.
It depends - do you want an easier to expand system? Do you want a smaller packed size?
Smaller packed size, mostly so it will preform with many requests correctly and wont be overloaded.
Your answer
Follow this Question
Related Questions
Accessing a database though $_GET 1 Answer
Players online counter 1 Answer
unity3d connect to php or coldfusion for database information 2 Answers
WWWForm Question 2 Answers
Javascript with php 1 Answer