Hey I have made a basic PHP script that holds flash game information and displays them. I want some site statistics such as total games, total plays. Please help. the play count is on each game in the 'game' table under the field 'plays'. I just need some way of adding all of the 'plays' from each game to get my total plays. As for the total games i just need something to count how many records there are in the 'game' table. Thanks, Callum.
Total can be retrieved using group by modifiers Example: SELECT game_id,SUM(plays) FROM game GROUP BY game_id WITH ROLLUP; Code (markup): The grand total super-aggregate line is identified by the value NULL in the game_id column.