Dear ALL Web Master
newbie as I am need your help
table_1
+-------------+-----+---+
| i_date | num |val|
+-----------------------+
| 2012-07-01 | 201 | 1 |
| 2012-07-02 | 201 | 1 |
| 2012-07-03 | 201 | 1 |
| 2012-07-01 | 202 | 1 |
| 2012-07-02 | 202 | 1 |
| 2012-07-01 | 203 | 0 |
| 2012-07-02 | 203 | 0 |
| 2012-07-03 | 203 | 0 |
| 2012-07-01 | 204 | 0 |
| 2012-07-02 | 204 | 0 |
| 2012-07-03 | 204 | 0 |
How do i use PHP to crosstab the table_1 and echo it to the page to be:
+-----+--------------+-------------+-------------+
| num | 2012-07-01 | 2012-07-02 | 2012-07-03 |
+-----+--------------+-------------+-------------+
| 201 | 1 | 1 | 1 |
| 202 | 1 | 1 | 0 |
| 203 | 1 | 1 | 1 |
| 204 | 0 | 0 | 0 |
+-----+--------------+-------------+-------------+
somehow i would like to entry some rows on table_1 with a new date using a form. I wish i could view it (continuing) on the page.
Big Thanks for all you guys.