Retrieving hosted MySql/MariaDB data using api

Post Reply
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Retrieving hosted MySql/MariaDB data using api

Post 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
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Retrieving hosted MySql/MariaDB data using api

Post 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
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Re: Retrieving hosted MySql/MariaDB data using api

Post 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
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
Post Reply