I have column with the name number
and table name data
.
The column number has numbers in range 1-9.(just some data)
I need to sum all these values in the column. How do i do that?
Any easy simple command. I tried sum(number)
but not coming
I have column with the name number
and table name data
.
The column number has numbers in range 1-9.(just some data)
I need to sum all these values in the column. How do i do that?
Any easy simple command. I tried sum(number)
but not coming
This this.
$web = mysql_query("select SUM(number) as sumNumber FROM data");
$web_sum=mysql_fetch_assoc($web);
echo $web_sum['sumNumber'];