データベースから取得した情報を表示するためのデータテーブルがあります。8列の場合、データは完全に表示されますが、htmlにもう1列を追加して、データベースから1列の情報を取得しようとすると、データテーブルが台無しになります。参考までにコードを添付しました:
私の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,
});
});
任意の提案やアイデアは高く評価されています。