我正在使用一些表格来显示数据库中的数据,但我正在尝试改变表格宽度,但我没有。我一直在使用内联宽度、重要、id 和类,但都失败了。是的,我想当我在简单上应用宽度时清除那里我的意思是没有动态数据。比工作正常。我在下面显示图片。
<table border="1" style="width: 18px !important;" >
<?php
include("db.php");
$result1=mysql_query("SELECT * FROM books");
$f0 = mysql_field_name( $result1,0);
$f1 = mysql_field_name( $result1,1);
$f2 = mysql_field_name( $result1,2);
$f3 = mysql_field_name( $result1,3);
$f4 = mysql_field_name( $result1,4);
$f5 = mysql_field_name( $result1,5);
$f6 = mysql_field_name( $result1,6);
$f7 = mysql_field_name( $result1,7);
$f8 = mysql_field_name( $result1,8);
$f9 = mysql_field_name( $result1,9);
$f10 = mysql_field_name( $result1,10);
echo "<th>".$f0."</th>";
echo "<th>".$f1."</th>";
echo "<th>".$f2."</th>";
echo "<th>".$f3."</th>";
echo "<th>".$f4."</th>";
echo "<th>".$f5."</th>";
echo "<th>".$f6."</th>";
echo "<th>".$f7."</th>";
echo "<th>".$f8."</th>";
echo "<th>".$f9."</th>";
echo "<th>".$f10."</th>";
$result=mysql_query("SELECT * FROM books");
while($test = mysql_fetch_array($result))
{
$id = $test['BookID'];
echo "<tr>";
echo"<td><font color='black'>" .$test['BookID']."</font></td>";
echo"<td><font color='black'>" .$test['name']."</font></td>";
echo"<td><font color='black'>". $test['father_name']. "</font></td>";
echo"<td><font color='black'>". $test['monthly_income']. "</font></td>";
echo"<td><font color='black'>". $test['wasiyat_number']. "</font></td>";
echo"<td><font color='black'>". $test['wasiyat_fund']. "</font></td>";
echo"<td><font color='black'>". $test['tahrikaa_jadid_fund']. "</font></td>";
echo"<td><font color='black'>". $test['waqfi_jadid_fund']. "</font></td>";
echo"<td><font color='black'>". $test['local_fund']. "</font></td>";
echo"<td><font color='black'>". $test['jalsa_salana_fund']. "</font></td>";
echo"<td><font color='black'>". $test['total']. "</font></td>";
include("permissions.php");
echo"<td> <a href ='datamanage/view.php?BookID=$id'>Edit</a>";
echo"<td> <a href ='datamanage/del.php?BookID=$id'><center>Delete</center></a>";
echo "</tr>";}
mysql_close($conn);
?>
</table>