I have a high school sports site for basketball.
I would like to display stats and totals. I have created the data base with three tables Players,games,stats. the bulk of the stats are entered in the stats table.
The stats table is like this. pid represents unique player id and gid represents unique game id.
id | pid | gid | pts | thr | rbs | blks | ast | etc.
1----10-----1----19-----2-----2-----3-----3----etc.
2-----5-----1----9------0-----1-----1-----1----etc.
3-----7-----1----5------1-----0-----2-----6----etc.
4----10-----2----12-----1-----2-----4-----2----etc.
The Id is unique but the pid and gid are unique for players and games.
All I need to do is display the sum of all unique gid on each line for each unique game id played on one stats page. Then for each players page display the sum for unique gid on each line for that certain unique pid (player).
I need help on the php code to use to display results.
This is what I have so far. I'm using dreamweaver 8
<?php require_once('../Connections/Connection.php'); ?>
<?php
mysql_select_db($database_Connection, $Connection);
$query_statz = "SELECT * FROM stats";
$statz = mysql_query($query_statz, $Connection) or die(mysql_error());
$row_statz = mysql_fetch_assoc($statz);
$totalRows_statz = mysql_num_rows($statz);
?>
I don't do this for living I just volunteered to do site for local high school basketball team.
Please help. much gratitude. Thankyou