I have a table with 3 columns. Points, Matches, and Average.
'Points' and 'Matches' are getting their values from a mysql database and for the 'Average' I'm dividing 'Score' by 'Matches' using the following php code:
<?php echo bcdiv($row_rstbl_players1['Points'], $row_rstbl_players1['Matches'], 2);
?>
These results are all being displayed using Dreamweaver's 'Repeat Region' function.
My question is: Is there a way to have a heading above the Average column, that is actually a link, which when clicked on, will sort the results in ascending/descending order?
Or, is there a way to get the database to automatically divide the 'Points' column value by the 'Matches' column value and fill the 'Average' column with the result?
Any guidance with regards to either of the above two questions would be very helpful.