|
below are the php coding that i used to display a data in the table form..
what i want to do is the number which is .$row['number']. will be automatically increment when there is a new data in the table..
how to do it by using loop...
<?php
$query="SELECT * FROM asset";
$result = mysql_query($query);
if (!$result)
echo "<h3>Cannot Process Query</h3>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "<tr>";
echo "<td class=style6>".$row['number']."</td>";
echo "<td class=style6>".$row['unit']."</td>";
echo "<td class=style6>".$row['asset']."</td>";
echo "<td class=style6>".$row['quantity']."</td>";
echo "</tr>";
}
}
?>
|