Page 1 of 1

Retrieving hosted MySql/MariaDB data using api

Posted: Fri Jun 21, 2019 3:58 am
by hua
A hosting company I'm using provide MySql database but doesn't opened it to world so I can't use FWCONNECT.

They suggest I create a script to act as an api to communicate with the server.

Anyone has done something similar? The script would need to cover the usual stuffs; adding, editing record, make enquiry

TIA

Re: Retrieving hosted MySql/MariaDB data using api

Posted: Fri Jun 21, 2019 4:05 am
by anserkk
1. You can have a php script on your hosted server.
2. You will be calling this php script from your Fivevin application
3. This php script will accept parameters from your Fivewin application which will be your SQL queries or Data manipulation commands
4. This php script will return the resulting recordset as JSON
5. The JSON data received from the hosted server will be processed in your fivewin application

Re: Retrieving hosted MySql/MariaDB data using api

Posted: Fri Jun 21, 2019 4:18 am
by hua
Thanks for the quick reply Anserk. Now I have a starting point

If anyone else has some useful links, pointers especially code snippets to share they are welcomed and I thank you in advance

The database in question need not even be a MySql database but simple dbfs