微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

怎么办我在html中生成这个表?

这是要生成

This is to be generated

我能够产生什么

What I have been able to generate

我只想要GUI部分的帮助.请不要低调,否则我将无法提问.

<body>

<div class="container-fluid" style="margin-top:5%;">
    <h3><b>PRODUCTION</b></h3>
    <table id="StatusTable">
        <tr>
            <th>Phase</th>
            <th>Error Code</th>
            <th>Error Description</th>
            <th>Turnback</th>
            <th>score</th>
            <th>Start Date</th>
            <th>Incorporation Date</th>
            <th>Completion Date</th>
        </tr>
        <tr>
            <th>Authoring</th>
            <td>---</td>
            <td>---</td>
            <td>---</td>
            <td>---</td>
            <?PHP
            session_start();
            $WO_ID = $_SESSION['SELECTED_WO_ID'];
            $sql="SELECT * FROM `associated_wos` WHERE `ID` = '$WO_ID'";
            //echo $sql;
            $result = MysqLi_query($conn,$sql);
            while ($row = MysqLi_fetch_array($result))
            { ?>
                <td><?PHP echo $row["StartDate"]; ?></td>
                <td>---</td>
                <td><?PHP echo $row["SFCK SubmissionDate"];?></td>
                <?PHP
            }?>
            ?>
        </tr>
        <tr>
            <?PHP
            $value = 'Peer Review';
            $sql="SELECT * FROM `wo_errorinfo` WHERE `WO_NO` = '$WO_ID' AND `Review_Type` = '$value'";
            $result = MysqLi_query($conn,$sql);
            $num_rows = MysqLi_num_rows($result);
            ?>
        <tr>
            <th rowspan = "<?PHP echo $num_rows + 1 ;?>">Peer Review</th>
            <?PHP
            while ($row = MysqLi_fetch_array($result)) {?>
                <tr>
            <td><?PHP echo $row["Error_Code"];?></td>
            <td><?PHP echo $row["Error_Description"];?></td>
            <td><?PHP echo $row["Error_Quantity"];?></td>
        <?PHP
        }?>
            <?PHP
            $select = "SELECT * FROM `wo_reviewerqa` WHERE `WO_ID` = '$WO_ID' and `reviewType` = '$value'";
            $result1 = MysqLi_query($conn,$select);
            $num_rows1 = MysqLi_num_rows($result1);
            while($row1 = MysqLi_fetch_array($result1))
            {?>
                <td rowspan = "<?PHP echo $num_rows + 1 ?>"><?PHP echo $row1["reviewscore"];?></td>
                <td rowspan = "<?PHP echo $num_rows + 1 ?>"><?PHP echo $row1["reviewStartDate"];?></td>
                <td rowspan = "<?PHP echo $num_rows + 1 ?>">---</td>
                <td rowspan = "<?PHP echo $num_rows + 1 ?>"><?PHP echo $row1["reviewCompleteDate"];?></td>
            <?PHP
            }
             ?>

     </tr>
    </tr>
    </table>
</div>
</body>

我应该做些什么来获得所需的表格.我能够生成该表的唯一方法是交换列.我应该使用JOINcommand吗?

解决方法

您需要GUI,以下是表格的HTML结构

<table border="1" cellpadding="5">
  <tr>
    <td colspan="8"><center>PRODUCTION</center></td>
  </tr>
    <tr>
        <td>Phase</td>
        <td>Error Code</td>
        <td>Error Description</td>
        <td>Turnback</td>
        <td>score</td>
        <td>Start Date</td>
        <td>Incorporation Date</td>
        <td>Completion Date</td>
    </tr>
    <tr>
        <td>Authoring</td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td rowspan="2">Peer Review</td>
        <td></td>
        <td></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td rowspan="2">Internal Review</td>
        <td></td>
        <td></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
        <td rowspan="2"></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
    </tr>
</table>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐