Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 4th, 2008, 03:08 AM
Familiar Sight
 
Join Date: Sep 2007
Posts: 194
Default Union of numbers inside a MYSQL table

Hi everyone
I need to retrieve the union of numbers in a MYSQL table with PHP
Here is an example:

Code:
+--------+---------+
| users  | points  |
+--------+---------+
| David  |     10  |
| Peter  |     18  |
| John   |     23  |
+--------+---------+
And what I need is to get 51 which is 10+18+23


Thanks / Behzad
Reply
  #2  
Old September 4th, 2008, 10:44 AM
Administrator
 
Join Date: Sep 2006
Posts: 11,298
Default

Read about the SUM function.
Reply
  #3  
Old September 4th, 2008, 01:35 PM
Familiar Sight
 
Join Date: Sep 2007
Posts: 194
Default

Hi
And thank you r035198x
You are a life saver

THANKS AGAIN its working now.
Reply
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles