Learn MySQL with Server2Go

September 12th, 2017

In this fourth brief run through of how to make a dynamic website we look at MySQL with the help of Server2Go and perform a few exercises I found online at the excellent W3Schools website.

Let’s start from scratch this time, download a new copy of Server2Go from http://www.computerbild.de/download/Server2Go-9618.html and unzip it into a folder.

You don’t have to use the aging Internet Explorer as the browser. I have discovered that you can change the name of the browser in the settings in the file pms_config.ini just look through the settings until you find the browser setting and change it to the name of the browser you prefer. I just tried it with Firefox and it worked.

Once you have seen that Server2Go is running we need to get rid of the main index page and that’s easily done by renaming the htdocs folder to htdocs_old and making  a new, empty htdocs folder in the same place.

You can copy the zipped files for the exercise from the link below. Unzip the file in the new htdocs folder.

http://www.singleaspect.org.uk/s2go/

Go to the page I mentioned earlier …

https://www.w3schools.com/php/php_mysql_intro.asp

… and start reading. Read the text and each time it shows a program you can run the relevant php file you have just downloaded from this blog. All you have to do to run it is to click it in the list that appears on your computer as below:-

If you want to you can just run down the list clicking each one and read the results on the screen. You won’t learn a lot but you’ll be able to see if they’re working or not. The most interesting is 10 Select to table which uses a While loop (see elsewhere) to extract the data and write it into an HTML table thus proving that all the preceding steps have functioned.

Leave a Reply