Please put the appropriate code tags around any code you post. It makes it so much easier to read.
PHP Code:
$sql = "SELECT\n"
. " player_name\n"
. " , r1\n"
. " , r2\n"
. " , r3\n"
. " , r4\n"
. " , r1+r2+r3+r4 AS total\n"
. "FROM scores LIMIT 0, 30 ";
What are all those \n and concatenations? You can format a query on multiple lines like this (makes it easier to read):
PHP Code:
$sql = "
SELECT
player_name
, r1
, r2
, r3
, r4
, r1+r2+r3+r4 AS total
FROM scores
LIMIT 0, 30
";
But anyway, in your code you never execute that query. Instead, you execute this one:
PHP Code:
$query_Recordset1 = "SELECT player_name, r1, r2, r3, r4 FROM scores";
So right now, there is no total to display at all.
Unless you calculate it in PHP.
Bookmarks