Hi below code prints results from first saved to last saved. Is there a way to get last saved on the top row once the data is displayed? (All records in the reverse order.) thanks.
while ($recz = mysql_fetch_array($runz))
{
echo "<tr class='taB'>";
echo "<td>".$recz["chkNum"]."</td>";
echo "<td>".$recz["InvoNum"]."</td>";
echo "<td>".$recz["InvoVal"]."</td>";
echo "<td>".$recz["InvoDate"]."</td>";
echo "<td>".$recz["type"]."</td>";
echo "<td class='ta'>".$recz["statu"]."</td>";
echo "</tr>";
}
You will need to change your query. Use
ORDER BY ... DESC, where the...is the column name that determines the order of the results.In your HTML output, it looks like you have a column named
InvoDate. Perhaps that’s the column you need. If so, your query would end withORDER BY InvoDate DESC.