thanks
I was actually trying to add the values of the COLUMS
But you tought me how i can add individual values.
I can put them in a PHP while loop and get the SUM of the columns right?
$TOTALTIME=0;
$count=0;
$result = mysql_query("SELECT DAY+NIGHT AS TT FROM MAIN WHERE PER_ID='$username'",$db);
While ($myrow = mysql_fetch_array($result)){
extract ($myrow);
$TOTALTIME=($TT+$TOTALTIME);
$count=$count+1;
}
echo "Total Time: $TOTALTIME hours.<br><br><br>";
This gives me what i need. The total of the columns DAY and NIGHT.
It also gives me the number of entries which are stores as $count.
I'm getting the feeling like i'm taking the long way.
Is there a simpler way to do all this?
Thanks
Noam