|
-
Jul 15th, 2007, 09:36 PM
#1
Thread Starter
Fanatic Member
MySQL addition
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?
Last edited by k1ll3rdr4g0n; Jul 15th, 2007 at 09:42 PM.
-
Jul 15th, 2007, 09:37 PM
#2
Thread Starter
Fanatic Member
Re: MySQL addition
haha I just figure it out:
SELECT count(column name) FROM table;
Edit:
Actually thats not it sorry...hmmm
Its really SUM(column name)
Last edited by k1ll3rdr4g0n; Jul 15th, 2007 at 09:44 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|