Retrieving hosted MySql/MariaDB data using api

Retrieving hosted MySql/MariaDB data using api

Postby hua » Fri Jun 21, 2019 3:58 am

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.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Retrieving hosted MySql/MariaDB data using api

Postby anserkk » Fri Jun 21, 2019 4:05 am

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
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Retrieving hosted MySql/MariaDB data using api

Postby hua » Fri Jun 21, 2019 4:18 am

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.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 73 guests