i want to get a single value to set in a Global Variable in my project from a specific field from my mysql database
i cant use MySql directly in Construct 2? so i need to use an external PHP file with the query on it?
SELECT * FROM scores ORDER BY points DESC Limit 1
and i want to save that value into a Global Variable called LastScore...
how can i do that?
i dont understood very well how AJAX.LastData works :S
yes, you'll need php/perl/anything else to query the MySQL database and then return the data. look up cgi scripts and you'll see lots of exaamples. you can then use ajax to query the script on your server and then parse the data.
just be aware that you will find it awkward to test as you need to have a server and get around the cross-site scripting issus.
Develop games in your browser. Powerful, performant & highly capable.
ill try this in localhost,i know php+mysql, it is just dont get very well ajax in C2 xD
https://www.scirra.com/tutorials/346/on ... -php-mysql
well, that was easy... lets see later when the game is published to try if it works in the play store with (of course with my own hosting) xD!