Where main.hyperconnection has the IP address, database name, Password and so forth.
I have successfully installed and used the MySql sample from B4V but I don't have a clue what PHP does or where it is supposed to be - I expect the server - but after that I am lost.
The recommended way to connect Android to MySQL databases is with a web server (this is true whether you use Java or Basic4android). There is no other reliable way to do it.
The Php script is the web server in this case. It takes the query passes it to the MySQL db.
After further searching I found that PHP and Apache/WampServer are used together - apparently Apache/WampServer is the Webserver while PHP is a scripting language. Do I need both? Therefore; If I want to query something from my MySql database using Basic4Android I would:
1) Click on an object that I want information on on my tablet
2) The query is formatted (as necessary) in B4A and sent to the WEBserver
3) The WEBserver recognizes the query and forwards it to PHP
4) PHP sends the query to MySql and MySql gathers the Data and sends it to
5) PHP that gives it to the WEBserver then to B4A and my screen.
I guess, what I have been doing is directly querying MySql on my LAN and as I can query directly. While, using the WEB because with the latency and many other connections - I have to pass my request to a friend (so to speak) and wait for the response while I am doing something else. Correct?
The steps you pointed out are correct, regarding the "latency using the web" is the same thing, you build a query, send it to the cloud and receive a response, nothing different than using a direct ODBC connection.
There are plenty of free web servers out there, you can set up one locally on your machine, add PHP and MySQL and test it.
Thanks for the support. I now have a WEBhost (free to develop, otherwise still very Inexpensive) that supports an Apache server, PHP and MySql. I will soon be able to run my VB app with data on the cloud. See where the hick-ups are and write "Localized" code in B4A until I can implement a full set on B4A - if I live that long.
Do not despair - there are many books on using PHP and MySQL together which are full of examples you can copy, as well as online tutorials. Just google "PHP and MySQL".
I have a website with 11,000 photographs which I wrote myself in this way and I knew nothing about PHP or MySQL when I started.