0

我有一个数据表来显示从数据库中提取的信息。对于八列,数据显示完美,但是当我尝试在 html 中再添加一列并从数据库中提取一列信息时,数据表被搞砸了。我已附上我的代码以供参考:

我的html表

<table id="datatables" class ="display">
<thead>
    <tr>
     <th>University</th>
       <th>Country</th>
       <th>Total_Pubs</th>
       <th>Per Pubs in 10 % SNIP</th>
       <th>Per Pubs in Top 25% SNIP</th>
       <th>Total Cites</th>
       <th> Per Cites from Top 10% SNIP</th>
       <th>Per Cites from Top 25% SNIP</th>                      
    </tr>
</thead>
<tbody>

从数据库中获取数据:

 while ($row = mysql_fetch_array($result)) {


                <tr>
                   <td><?=$row['University_Name']?></td>
                    <td><?=$row['Country_Name']?></td>
                    <td><?=$row['Total_Pubs']?></td>
                    <td><?=$row['Per_Pubs_A1']?></td> 
                    <td><?=$row['Per_Pub_A1_A']?></td>  
                    <td><?=$row['Total_Cite']?></td>
                    <td><?=$row['Per_Cite_A1']?></td> 
                    <td><?=$row['Per_Cite_A1_A']?></td>         
                </tr>

            }

用于数据表的 JQUery:

       jQuery(document).ready(function() {
                    jQuery('#datatables').dataTable({
                    "sPaginationType":"full_numbers",
                    "aaSorting":[[2, "desc"]],
                    "bJQueryUI":true,

    });
  });

任何建议和想法都将受到高度赞赏。

4

0 回答 0