Jump to content

Counting a specific column of multiple rows


NLCJ

Recommended Posts

Hello,

I want to count one column where the userid is the same. Let's say I got this:

$get = mysql_query("SELECT column FROM table WHERE userid='1');
[code=php:0]
For example, this gives:
[code]
UserID - Column
1 - 24
1 - 58
1 - 89

I want that this goes like: 24 + 58 + 89, how can I do this? Or is this a PHP specific question?

 

Sorry that I didn't use a table, but it just doesn't insert one when I say it should.

 

Regards,

NLCJ

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.