我有这个表名“ casillas ”
colum_1 colum_2 colum_3 colum_4
___ ___ ___ ___ ___ ___ ___
field_1 | 46654 | 8463 | 1284 | 1654
field_2 | 14668 | 547896 | 11563 | 4565
field_3 | 6486 | 54763 | 15697 | 56776
field_4 | 45684 | 5668 | 989 | 48678
我像这样在 PHP 中显示它:
$result = mysql_query("SELECT SUM(colum_1) FROM casillas");
while($row = mysql_fetch_array($result)){
$colum_1_result = $row['SUM(colum_1)'];
}
$result = mysql_query("SELECT SUM(colum_2) FROM casillas");
while($row = mysql_fetch_array($result)){
$colum_2_result = $row['SUM(colum_2)'];
}
$result = mysql_query("SELECT SUM(colum_3) FROM casillas");
while($row = mysql_fetch_array($result)){
$colum_3_result = $row['SUM(colum_3)'];
}
$result = mysql_query("SELECT SUM(colum_4) FROM casillas");
while($row = mysql_fetch_array($result)){
$colum_4_result = $row['SUM(colum_4)'];
}
echo '<table style="width: 100%">
<tr>
<td>Results:</td>
<td>'.$colum_1_result.'</td>
<td>'.$colum_2_result.'</td>
<td>'.$colum_3_result.'</td>
<td>'.$colum_4_result.'</td>
</tr>
</table>';
我的问题是:当值比其他值更大时,有没有办法让它变粗或从单元格中更改 CSS?
在这种情况下,它将是来自colum_2的那个