What I am trying to do and for some reason am drawing a blank, is figure out how to pull several numbers from the same column in a table and add them together to get one final number for another math problem.
For example:
$query = mysql_query ("SELECT attr_amt FROM user_attr WHERE user_id = '".$user_id."'") or die(mysql_error());
And then I assume I would add a foreach but for some reason cannot for the life of me figure out how to add the numbers together. Perhaps its because its 2am lol.
For example lets say there are three entries in the table for that user.
Any ideas/suggestions/guidance would be greatly appreciated!
Thanks!