Hi,
I have a database set out like this:
User - # of times played
User1 - 13
User2 - 21
User3 - 92 etc...
I would like to know how to add all the # of times played together?
Thanks in advanced.
Adding multiple mysql row records
Moderator: General Moderators
Re: Adding multiple mysql row records
when you use mysql to get the content..i assume the db is mysql....you will get an array...use array_count_values($array)...u will get the sum
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Adding multiple mysql row records
Code: Select all
SELECT SUM(`your_count_column`) AS `times_played` FROM `your_count_table`Re: Adding multiple mysql row records
Got it working beautifully, thanks alot 