I found these code from internet and tried to add column with "username" value. But, it can't show the username value from database in the php table.
<?php
$no = 1;
$tampil = mysql_query("SELECT * from barangrusak,barang WHERE barang.kode_barang=barangrusak.kode_barang");
while ($data = mysql_fetch_array($tampil)) {
?>
<tr>
<td align="center"><?php echo $no; ?></td>
<td align="center">B00-<?php echo $data['kode_barang']; ?></td>
<td align="center"><?php echo $data['nama_barang']; ?></td>
<td align="center"><?php echo $data['jumlah_rusak']; ?></td>
<td align="center"><?php echo $data['tanggal_rusak']; ?></td>
<td align="center"><?php echo $data['username']; ?></td>
</tr>