Php MYSql,不同种类的交叉表报告

I got 2 tables, comparitive_st_sup and comparitive_statement1

comparitive_st_sup fields are as follows:

  • tender_id
  • supplier_name
  • item_name
  • quantity
  • unitprice
  • total

comparitive_statement1 fields are as follows:

  • tender_id
  • sup_name (supplier name)
  • coc_charges
  • export_charges
  • iata_charges

Both the tables are linked by supplier_name. comparitive_st_sup table has many item_name (items or Products) for a single supplier. Where as comparitive_statement1 have details of supplier and its cost (quantity, unitprice and total)

Now i need a report to come in the following format:

<p>Data from comparitive_st_sup table</p>
<table border="1" width="100%">
    <tr>
        <td colspan="3" width="33%">
        <p align="center"><b>Supplier 1 Name</b></td>
        <td colspan="3" width="33%">
        <p align="center"><b>Supplier 2 Name</b></td>
        <td colspan="3" width="33%">
        <p align="center"><b>Supplier 3 Name</b></td>
    </tr>
    <tr>
        <td>Item name</td>
        <td>unit price</td>
        <td>qty</td>
        <td>item name</td>
        <td>unit price</td>
        <td>qty</td>
        <td>item name</td>
        <td>unit price</td>
        <td>qty</td>
    </tr>
    <tr>
        <td>item name</td>
        <td>unit price</td>
        <td>qty</td>
        <td>item name</td>
        <td>unit price</td>
        <td>qty</td>
        <td>item name</td>
        <td>unit price</td>
        <td>qty</td>
    </tr>
    <tr>
        <td colspan="3">&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <td colspan="3">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="3">Data from comparitive_statement1 table</td>
        <td colspan="3">&nbsp;</td>
        <td colspan="3">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="3">
        <p align="center"><b>Supplier 1 Name</b></td>
        <td colspan="3">
        <p align="center"><b>Supplier 2 Name</b></td>
        <td colspan="3">
        <p align="center"><b>Supplier 3 Name</b></td>
    </tr>
    <tr>
        <td colspan="3">COC Charges</td>
        <td colspan="3">COC Charges</td>
        <td colspan="3">COC Charges</td>
    </tr>
    <tr>
        <td colspan="3">Export Charges</td>
        <td colspan="3">Export Charges</td>
        <td colspan="3">Export Charges</td>
    </tr>
    <tr>
        <td colspan="3">Iata_Charges</td>
        <td colspan="3">Iata_Charges</td>
        <td colspan="3">Iata_Charges</td>
    </tr>
</table>

How can i achieve this? Pls Help. Thanx in advance.

</div>