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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.