PHP MySQL jQuery tutorial - Cinema Seat Booking
- 1 Unzipping the files
- 2 Looking at the database
- 3 PHP to JSON
- 4 Inject values from MySQL into JSON
- 5 Transforming data from MySQL into JSON
- 6 Taking out the cheats - build the rowLabels and colLabels from the database
- 7 Building the umap structure from the database
- 8 Tidying up
- 9 Making bookings to MySQL
Unzipping the files
Download the files from http://progzoo.net/cw1-2017.zip unpack them and put them on the web.
Looking at the database
Load the test data into your MySQL database.
PHP to JSON
Move from a static json file to a generated PHP data source.
Inject values from MySQL into JSON
Take data from the MySQL database and publish it in JSON format using PHP
Transforming data from MySQL into JSON
The grid data in MySQL is in the wrong format - build strings of the correct format.
Taking out the cheats - build the rowLabels and colLabels from the database
There is still a lot of hard coded detail in the PHP. Replace these data structures using a hash map.
Building the umap structure from the database
Pull more data from the database - the usage nap (umap) structure can be built using clever SQL statements and nifty PHP
We started with hard coded values and we must be sure that these are all removed.
Making bookings to MySQL
Allow internet users to add bookings to the database.