I need to get records from a table however the id in the table could be like 5,6,7,8,9 due to others not there and been deleted to other functions in the script
I need to take 5 and make is display 1 and 6 would be 2 and 7 would be 3 and so on.
This is what I have currently without the use of the ol and li
Code: Select all
<table width="798">
<tr><th>id</th><th width="211">Amount</th><th width="276">Date</th><th width="295">Status</th></tr>
<?php $query=mysql_query("SELECT * from line WHERE pid='7' AND username ='{$_SESSION['admin_user']}'")or die(mysql_error());
while($line = mysql_fetch_array($query, MYSQL_ASSOC)) {
echo '<tr><td>'.$line['id'].'</td><td width="211">'.$line['spent_amt'].'</td><td width="276">'.$line['date'].'</td><td width="295">'.$line['status'].'</td></tr>';
}
?></table>