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

BigToque

Lifer
Oct 10, 1999
11,700
0
76
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.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Get rid of the SUM and you should be ok, assuming G and A are numeric columns