I’ve searched the web trying to find examples of how to store tabular data in MySQL and loop through the rows to assemble a table using PHP, but no luck.
Here is a sample of my Excel file that I want to insert into MySQL. I then want to display it with PHP/HTML in its tabular form.
Keep in mind I have a lot of tables exactly like this for different countries so I am looking for a good MySQL schema to efficiently store this data, then have PHP make use of it by looping through the rows and id’s to pull the correct data.
How would you store this in MySQL?
How would you loop through the database with PHP to build columns?
Yet another way to do the summaries might be to do it on the client, I’ve got column (vertical) summaries working like that in the past, but not row (horizontal) totals at the same time I must admit (though I cannot easily see what “growth rate” is deduced from)
Seeing the totals would then be dependent upon JS being turned on of course.