PDA

Click to See Complete Forum and Search --> : MySQL addition


k1ll3rdr4g0n
Jul 15th, 2007, 09:36 PM
Heres a tough one (maybe not so tough?), lets say I have a column called 'hits', and I have 2 rows with hits = 3 (for arguments sake). Is it possible to make MySQL add up the 2 rows to make it return 6?

k1ll3rdr4g0n
Jul 15th, 2007, 09:37 PM
haha I just figure it out:

SELECT count(column name) FROM table;

Edit:

Actually thats not it sorry...hmmm

Its really SUM(column name)