We have booking data in spreadsheet looks like table in below, and each booking is for a full week.
| wk1 | wk2 | wk3 | wk4 | wk5 |..........| wk52 |
==================================
E1 | resv | |resv | |resv | |resv
E2 | | resv |resv |resv |
E3 | resv | resv |...............................................
E4 | resv |
E5 |
... | resv | resv|....................................
... |
E50|resv | resv | | resv
It looks great excel but required one person to manage all bookings. So we moved to web interface and allow users to make their own bookings. Now, data moved to sql database with fields (id, wk#, room, other....),
and records like below.
01 wk1 E1
02 wk1 E3
03 wk1 E4
..... etc....
nn wk2 E2
nn wk2 E3
... and more
Now, I need a method in PHP to print above data in HTML table that looks like excel table in above. It doesn't have to print 52 wks in one page, but at least something like 4 wks view and next page to show the next 4 wks.
At start it will print the first 4 wks from the current week (wk 11), and next page will print wk12 to wk15, etc.
| wk1 | wk2 | wk3 | wk4
===================
E1 | resv | |resv |
E2 | | resv |resv |resv
E3 | resv | resv |...............
E4 | resv |
E5 |
more rows......
Can someone here give me a direction how to code this in PHP?
Thank you very much!
bobo