sam06 Posted July 6, 2008 Share Posted July 6, 2008 My Query is to find the SUM of all values in the 'Value' column where the Username = $username $result = mysql_query("SELECT username, SUM(Value) FROM clicks GROUP BY username WHERE username='$username'") or die(mysql_error()); $name = mysql_result ($result, 0, 'Username'); I am then going to use that result in a sentance like Your total amount is '$name' Many Thanks, Sam Link to comment https://forums.phpfreaks.com/topic/113465-sum-function/ Share on other sites More sharing options...
fenway Posted July 6, 2008 Share Posted July 6, 2008 Sounds like you need to alias that exrpession. Link to comment https://forums.phpfreaks.com/topic/113465-sum-function/#findComment-583059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.