使用php和mysql中的动态列创建动态表

First I would like to congratulate the site, I already learned a lot from him. already tried in Brazil forum found nothing. I am in need and creates a dynamic table with dynamic column. following example!

  Local           01/12/2014 |02/12/2014 |03/12/2014
  Esteira         12.00   |  12.00    |  12.00
  Mesa            10.00   |   6.00    |   6.50
  Balança         13.50   |   8.00    |    9.50
  ponteira        10.00   |   9.00    |   23.00
  import          13.50   |   10.00   |   46.00

the code that use for table dinamic

  <table class="table table-bordered table-hover ">
                          <thead>
                            <tr>
                              <th>Produção</th>
                              <th>GREC</th>
                              <th>Realizado</th>
                            </tr>
                          </thead>
                          <tbody>
                            <?php do { ?>
                            <tr>
                              <td><?php echo $row_datatable['DataProd']; ?></td>
                              <td><?php echo $row_datatable['GREC']; ?></td>
                              <td><?php echo $row_datatable['Realizado']; ?></td>
                            </tr>
                            <?php } while ($row_datatable = mysql_fetch_assoc($datatable)); ?>
                          </tbody>
                        </table>