• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Is it possible to sum the values of multiple fields on a single SQL record?

I have fields for Goals and Assists.

I want to take those 2 fields and sum them to make a 3rd field PTS, then send them to variable in my PHP code to be printed to the screen.

My statement is this:

SELECT player_stats.G, player_stats.A, SUM (player_stats.G + player_stats.A) PTS
FROM player_stats
WHERE player_stats.PID =10
AND player_stats.season =1

The statement breaks with the bolded part.
 
Back
Top