JREAM Posted June 25, 2009 Share Posted June 25, 2009 How do i make it so that it adds up every price? $sql = "SELECT price FROM projects"; $result = mysql_query($sql); while ($query = mysql_fetch_array($result)) { $price[] = $query; $total += $price; // is this bad? } Quote Link to comment Share on other sites More sharing options...
JREAM Posted June 25, 2009 Author Share Posted June 25, 2009 I suppose ill just do SUM(price) for the SQL 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.