questions

Monkey Forums/Monkey Beginners/questions

KevPoole(Posted 2014) [#1]
Hi

i have some question help on these would be welcome!

1) i need to create a project that allows for offline editing of a database that when the device the application is running on is connected to the internet it speeks to a server and updates online mysql database with the contents from the offline database.

2) does monkey run php code offline?

can monkey do this?

Thanks
Kev


rIKmAN(Posted 2014) [#2]
If you are targeting GLFW (Desktop) there is an SQLite Module which you could use offline, then if connected to the internet you could download the new database and update it that way.


ziggy(Posted 2014) [#3]
1) i need to create a project that allows for offline editing of a database that when the device the application is running on is connected to the internet it speeks to a server and updates online mysql database with the contents from the offline database.

You should build a custom public API in your server that can retrieve those changes from the device, and update its database accordingly. You could communicate them using async http requests, and building PHP scripts on the server to handle this.

2) does monkey run php code offline?
No AFAIK. I don't think there's any (that I know of) PHP interpreter for iPhone or Android, but if you're on desktop, you could just install (or provide with your game) the PHP interpreter and run it from your GLFW code as an external process.